Restore deleted subscription
Description
Restores deleted subscription.
Changes "is_delete"
parameter from "false"
to "true"
.
Request URL
Method: POST
https://example.com/api/v1.1/subscriptions/undelete
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
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
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"db_id": 1,
"resource_id": 26,
"channel": "push",
"subscription_id": "abcdefghijklmnqrstuvwxyz",
"profile_id": "abcdefghijklmnqrstuvwxyz",
"provider": "Firefox"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<db_id>1</db_id>
<resource_id>26</resource_id>
<channel>push</channel>
<subscription_id>abcdefghijklmnqrstuvwxyz</subscription_id>
<profile_id>abcdefghijklmnqrstuvwxyz</profile_id>
<provider>Firefox</provider>
</xml>
Response example
- JSON
- XML
{
"data": null,
"error": 0,
"error_text": "Successful operation"
}
<xml>
<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 |
*The Meta organization, which owns Instagram, Facebook and WhatsApp products, has been declared as extremist and banned in Russia.