Delete profile subscription
Description
Deletes profile subscription.
Subscription remains but gets "is_delete : true"
property.
Request URL
Method: POST
https://example.com/api/v1.1/subscriptions/delete
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API токен |
format | string | "json" | No | Response data format. By default – json. |
profile_id | string | "abcdefghijklmnqrstuvwxyz" | Yes | Profile ID |
resource_id | int | 1 | Yes | Resource ID |
db_id | int | 1 | Yes | Database ID |
Additionally for the Email channel:
Parameters | Type | Example | Description |
---|---|---|---|
channel | string | "email" | Channel type |
string | "john@example.com" | Email address |
Additionally for the Push channel:
Parameters | Type | Example | Description |
---|---|---|---|
channel | string | "push" | Channel type |
provider | string | "Firefox" | Provider type |
subscription_id | string | "abcdefghijklmnqrstuvwxyz" | Subscription ID |
Additionally for the SMS channel:
Parameters | Type | Example | Description |
---|---|---|---|
channel | string | "sms" | Channel type |
phone | string | "+79000000000" | Phone number |
Additionally for the Telegram channel:
Parameters | Type | Example | Description |
---|---|---|---|
channel | string | "telegram_bot" | Channel type |
cc_data | object | { | Chat ID between Telegram bot and user |
Additionally for the WhatsApp channel:
Parameters | Type | Example | Description |
---|---|---|---|
channel | string | "whatsapp" | Channel type |
cc_data | object | { | WhatsApp user's phone number |
Request example
{
"channel": "email",
"db_id": 1,
"email": "john@example.com",
"profile_id": "abcdefghijklmnqrstuvwxyz",
"resource_id": 1,
"token": "abcdefghijklmnqrstuvwxyz"
}
Response example
{
"error": 0,
"error_text": "Successful operation"
}
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |