Updating Client Data
Last updated: 1 October 2024
The api/subscribers/update
method is used to request an update of the data of an existing recipient.
info
To update the recipient's data, its unique identifier is required, specified in the EXT_USER_ID
parameter at creation.
Calling the api/subscribers/update
Method
The recipient's data can be updated in whole or in part:
- To call the
api/subscribers/update
method to fully update the recipient's data, send a POST request to the URLhttps://app.edna.io/api/subscribers/update
. All the parameters passed in the request will be updated. - To call the
api/subscribers/update
method to partially update the recipient's data, send a PATCH request to the URLhttps://app.edna.io/api/subscribers/update
. Only some of the parameters passed in the request will be updated.
If the request is successful, the method returns a response with the code 200
.
Request Body Format
{
"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"
}
]
}
Request parameters
Parameter | Data type | Description |
---|---|---|
blacklisted | boolean | Determines whether the recipient will be excluded from the broadcast lists. - true — the recipient is blacklisted and cannot receive broadcasts; - |
addresses | array of strings | An array of recipient addresses and IDs. When sending a POST request, transmit the full array of recipient addresses or IDs, as the POST completely overwrites the array. |
addresses.address | string | The recipient's unique identifier. For example, a phone number or an account. |
addresses.type | string | The recipient's address type. |
addresses.info | object | Official information about the address. |
addresses.type | string | The recipient's ID type. The values are indicated in uppercase. To use the api/subscribers/update method, specify the EXT_USER_ID type identifier. Possible values: - INSTAGRAM_ID - FACEBOOK_ID - DEVICE_APP_ID - PHONE - EMAIL - UTM - COOKIE_ID - TELEGRAM_ID - GOOGLE_ID - APPLE_ID - YANDEX_ID - EXT_USER_ID |
parameterValues | array of strings | An array of variables. When sending a POST request, pass the full array of recipient parameters, as the POST completely overwrites the array. |
parameterValues.name | string | The name of the recipient's parameter. |
parameterValues.valueType | string | The type of the recipient's parameter. Possible values: - STRING - ENUM - DATE - NUMBER - BOOLEAN |
parameterValues.value | string | The value of the recipient's parameter. |
tagValues | array of strings | An array of recipient tags. When sending a POST request, pass the full array of the recipient's tags, as the POST completely overwrites the array. |
tagValues.name | string | The name of the recipient's pre-created tag. |