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
{
"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
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 |