Unsubscribe from multiple newsletter or push channels
POST
/cms/channel/unsubscribe
const url = 'https://api.example.com/cms/channel/unsubscribe';const options = { method: 'POST', headers: { 'API-Key': '<API-Key>', Authorization: 'Bearer <token>', Token: '<Token>', 'Content-Type': 'application/json' }, body: '{"channel_ids":[1]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.example.com/cms/channel/unsubscribe \ --header 'API-Key: <API-Key>' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Token: <Token>' \ --data '{ "channel_ids": [ 1 ] }'Unsubscribe an email from one or more newsletter or push channels. For e-mail channels, a soft-login (limited scope) token or a regular token (basic scope) are accepted. For push channels, you can either be authenticated to unsubscribe all the devices of the user, or you can be anonymous and provide a push token to unsubscribe a specific device.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
channel_ids
Array<integer>
Example generated
{ "channel_ids": [ 1 ]}Responses
Section titled “Responses”Unsubscription result
Media typeapplication/json
object
error
boolean
Example generated
{ "error": true}