Skip to main content

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.

File IconCreating Clients

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 URL https://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 URL https://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

ParameterData typeDescription
blacklistedbooleanDetermines whether the recipient will be excluded from the broadcast lists.

- true — the recipient is blacklisted and cannot receive broadcasts;

- false — the recipient can receive broadcasts.

addressesarray of stringsAn 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.addressstringThe recipient's unique identifier. For example, a phone number or an account.
addresses.typestringThe recipient's address type.
addresses.infoobjectOfficial information about the address.
addresses.typestringThe 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
parameterValuesarray of stringsAn array of variables.

When sending a POST request, pass the full array of recipient parameters, as the POST completely overwrites the array.
parameterValues.name stringThe name of the recipient's parameter.
parameterValues.valueTypestringThe type of the recipient's parameter.

Possible values:

- STRING

- ENUM

- DATE

- NUMBER

- BOOLEAN
parameterValues.valuestringThe value of the recipient's parameter.
tagValuesarray of stringsAn 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.namestringThe name of the recipient's pre-created tag.