Skip to main content

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

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI токен
formatstring"json"NoResponse data format.
By default – json.
profile_idstring"abcdefghijklmnqrstuvwxyz"YesProfile ID
resource_idint1YesResource ID
db_idint1YesDatabase ID

Additionally for the Email channel:

ParametersTypeExampleDescription
channelstring"email"Channel type
emailstring"john@example.com"Email address

Additionally for the Push channel:

ParametersTypeExampleDescription
channelstring"push"Channel type
providerstring"Firefox"Provider type
subscription_idstring"abcdefghijklmnqrstuvwxyz"Subscription ID

Additionally for the SMS channel:

ParametersTypeExampleDescription
channelstring"sms"Channel type
phonestring"+79000000000"Phone number

Additionally for the Telegram channel:

ParametersTypeExampleDescription
channelstring"telegram_bot"Channel type
cc_dataobject
{
"id": 1
}
Chat ID between Telegram bot and user

Additionally for the WhatsApp channel:

ParametersTypeExampleDescription
channelstring"whatsapp"Channel type
cc_dataobject
{
"phone": "+79000000000"
}
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

ParameterTypeDescription
errorintError code
error_textstringError text