Updating Client Data

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 or POST request to /api/subscribers/update.

To overwrite all client data with the values passed in the request, use a POST request.

For a partial update of the data, send a PATCH request – only the parameters passed in the request will be updated.

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! For POST request 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:
• INSTAGRAM_ID
• FACEBOOK_ID
• DEVICE_APP_ID
• PHONE
• EMAIL
• UTM
• COOKIE_ID
• TELEGRAM_ID 
• GOOGLE_ID
• APPLE_ID
• YANDEX_ID
• EXT_USER_ID

The EXT_USER_ID parameter is required to use this method.
parameterValuesarrayArray of parameters

Important! For POST request 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/NUMBER/BOOLEAN)
valuestringParameter value
tagValuesarrayArray of tags

Important! For POST request 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"
        }
    ]
}
In this article