Update Client’s Information

Use the update method to update the data of an existing client by their EXT_USER_ID – external identifier that is assigned to the client when creating them. If you do not know this identifier, you cannot update the entry. If the request is successful, you will receive a response with code 200 from the server.

URL

To use the method, send a PATCH request to /api/subscribers/update.

Request Parameters

ParameterTypeDescription
blacklistedbooleanIndicates whether the client needs to be excluded from broadcasts. true — the client is “blacklisted” and does not receive broadcast, false — the client receives broadcasts.
addressesarrayArray of the client’s addresses/identifiers.

Important! This array must contain the full array of the client’s addresses/identifiers, as this method does not add any values to the array, but completely rewrites it.
addressstringClient’s phone number
typestringClient’s identifier type (PHONE/EXT_USER_ID)
parameterValuesarrayArray of parameters

Important! This array must contain the full array of the required parameters, as this method does not add any values to the array, but completely rewrites it.
namestringParameter name
valueTypestringParameter type (STRING/ENUM/DATE)
valuestringParameter value
tagValuesarrayArray of tags

Important! This array must contain the full array of the tags you want to be assigned to the client, as this method does not add any values to the array, but completely rewrites it.
namestringTag’s name (the tag must be created in advance)

Request Example

{
    "blacklisted": true,
    "addresses": [
        {
            "address": "79997654321",
            "type": "PHONE"
        },
        {
            "address": "any_string",
            "type": "EXT_USER_ID"
        }
    ],
    "parameterValues": [
        {
            "name": "Name",
            "valueType": "STRING",
            "value": "Tasha"
        },
        {
            "name": "Surname",
            "valueType": "STRING",
            "value": "Strong"
        },
        {
            "name": "Middle name",
            "valueType": "STRING",
            "value": "Ann"
        },
        {
            "name": "Gender",
            "valueType": "ENUM",
            "value": "FEMALE"
        },
        {
            "name": "City",
            "valueType": "STRING",
            "value": "Chicago"
        },
        {
            "name": "Birthday",
            "valueType": "DATE",
            "value": "1999-12-28"
        }
    ],
    "tagValues": [
        {
            "name": "old_tag"
        }
    ]
}
Creating Clients
Next Article Removing Clients
In this article