Skip to main content

Creating Clients

Last updated: 30 September 2024

The api/subscribers/create method is used to request the creation of a broadcast list recipient.

Calling the api/subscribers/create method

To call the api/subscribers/create method, send a POST request to the URL https://app.edna.io/api/subscribers/create

If the request is successful, the method returns a response with the code 200 and creates a broadcast recipient with the external identifier EXT_USER_ID. If the request is unsuccessful, the method returns an error code.

Request body format

{
"blacklisted": false,
"addresses": [
{
"address": "3570000000",
"type": "PHONE"
},
{
"address": "any_string",
"type": "EXT_USER_ID"
}
],
"parameterValues": [
{
"name": "Name",
"valueType": "STRING",
"value": "Alex"
},
{
"name": "Surname",
"valueType": "STRING",
"value": "Johhson"
},
{
"name": "Middle name",
"valueType": "STRING",
"value": "James"
},
{
"name": "Gender",
"valueType": "ENUM",
"value": "MALE"
},
{
"name": "City",
"valueType": "STRING",
"value": "London"
},
{
"name": "Birthday",
"valueType": "DATE",
"value": "1999-12-29"
}
],
"tagValues": [
{
"name": "new_tag"
}
]
}

Example of sending a request via curl

curl --location --request POST 'https://app.edna.io/api/subscribers/create' \
--header 'Content-Type: application/json' \
--header 'x-api-key: your_secret_key' \
--data-raw '{
"your",
"pretty",
"json"
}'

Request Parameters

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

Possible values:

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

- false — the recipient can receive broadcasts.
addressesarray of stringsArray of recipient addresses or IDs.
addresses.addressstringThe recipient's unique identifier. For example, specify the recipient's phone number, internal identifier, and UUID. The ID is required for editing and deleting recipients.
addresses.typestringThe type of the recipient's ID. The values are indicated in uppercase.

To use the api/subscribers/create 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 stringsArray of parameters.
parameterValues.namestringName of the recipient's parameter.
parameterValues.ValueTypestringRecipient parameter type: STRING, ENUM, DATE
parameterValues.valuestringThe value of the recipient's parameter.
tagValuesarray of stringsArray of recipient tags.
tagValues.namestringName of the recipient's pre-created tag.