v1
latestOpenAPI 3.1.02026-07-26497885.9 KBUnsubscribe email (with token)
Unsubscribe an email address from future messages by calling this API from your custom unsubscribe page. Automatically disables the associated email subscription using a token-based approach.
post/apps/{app_id}/notifications/{notification_id}/unsubscribe?token={token}
Path parameters
app_idstring required
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
notification_idstring required
The "id" of the email message. Can be passed into the request from the email received by the user with liquid syntax {{message.id}}. See Create a Custom Unsubscribe Page for setup details.
Query parameters
tokenstring
The unsubscribe token that is generated via liquid syntax {{subscription.unsubscribe_token}} when personalizing an email. See Create a Custom Unsubscribe Page for setup details.
Response
202
Example response
{
"success": "true"
}