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
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
db_id | int | 1 | Yes | Database ID |
format | string | "json" | No | response data format. By default – json. |
profile_id | string | "abcdefghijklmnqrstuvwxyz" | Yes | Profile ID |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"db_id": 1,
"profile_id": "abcdefghijklmnqrstuvwxyz"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<db_id>1</db_id>
<profile_id>abcdefghijklmnqrstuvwxyz</profile_id>
</xml>
Response example
- JSON
- XML
{
"data": [
{
"resource_id": 29,
"channel": "email",
"email": "example@example.com",
"priority": 10,
"status": "suspended",
"custom_fields": {
"custom_int_field_2": 20000
}
}
],
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<channel>email</channel>
<custom_fields>
<custom_int_field_2>20000</custom_int_field_2>
</custom_fields>
<email>example@example.com</email>
<priority>10</priority>
<resource_id>29</resource_id>
<status>suspended</status>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
Parameter | type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
channel | string | Channel type (email, push or sms) |
priority | int | Subscription priority ( 0 for the highest priority) |
resource_id | int | Subscription resource ID |
status | string | Subscription status |
custom_fields | object | System and custom subscription fields. You can get information about subscription fields in a resource using the /v1.1/resources/fields_get method |
cats | array | The resource categories to which the profile is subscribed. |
Additionally for the Email channel:
Parameter | Type | Description |
---|---|---|
string | Email address |
Additionally for the Push channel:
Parameter | Type | Description |
---|---|---|
provider | string | Provider type |
subscription_id | string | Subscription ID |
Additionally for the SMS channel:
Parameter | Type | Description |
---|---|---|
phone | string | Phone number |
Additionally for the Telegram channel:
Parameter | Type | Description |
---|---|---|
cc_data | object | Chat ID between Telegram bot and user |
Additionally for the WhatsApp* channel:
Parameter | Type | Description |
---|---|---|
cc_data | object | WhatsApp* user's phone number |
*The Meta organization, which owns Instagram, Facebook and WhatsApp products, has been declared as extremist and banned in Russia.