Skip to main content

Get all profile subscriptions

Description

Retrieves all subscriptions of a single profile.

Request URL

Method: POST

https://example.com/api/v1.1/subscriptions/list

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
db_idint1YesDatabase ID
formatstring"json"Noresponse data format.
By default – json.
profile_idstring"abcdefghijklmnqrstuvwxyz"YesProfile ID

Request example

{
"db_id": 1,
"profile_id": "abcdefghijklmnqrstuvwxyz",
"token": "abcdefghijklmnqrstuvwxyz"
}

Response example

{
"data": [
{
"channel": "email",
"email": "john@example.com",
"priority": 0,
"resource_id": 1,
"status": "subscribed",
"custom_fields": {
"_browser_name": "Firefox",
"_device_type": "web",
"custom_field_1": "test value"
},
"cats": [
"category_1",
"category_2"
]
}
],
"error": 0,
"error_text": "Successful operation"
}

Response parameters

ParametertypeDescription
errorintError code
error_textstringError text
channelstringChannel type (email, push or sms)
priorityintSubscription priority ( 0 for the highest priority)
resource_idintSubscription resource ID
statusstringSubscription status
custom_fieldsobjectSystem and custom subscription fields.

You can get information about subscription fields in a resource using the /v1.1/resources/fields_get method
catsarrayThe resource categories to which the profile is subscribed.

Additionally for the Email channel:

ParameterTypeDescription
emailstringEmail address

Additionally for the Push channel:

ParameterTypeDescription
providerstringProvider type
subscription_idstringSubscription ID

Additionally for the SMS channel:

ParameterTypeDescription
phonestringPhone number

Additionally for the Telegram channel:

ParameterTypeDescription
cc_dataobjectChat ID between Telegram bot and user

Additionally for the WhatsApp channel:

ParameterTypeDescription
cc_dataobjectWhatsApp user's phone number