Unsubscribe through an edition’s link
const url = 'https://your-tenant-host/v1/newsletters/unsubscribe';const options = {method: 'POST'};
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://your-tenant-host/v1/newsletters/unsubscribeEnqueues the unsubscribe and answers 200. The signature is checked afterwards, so a 200 does not mean the link was valid. As the RFC 8058 one-click target (List-Unsubscribe=One-Click): no body back, and the link’s own list. From the page’s form (page, list repeated): the ticked lists on that site, and a confirmation page. Safe to retry.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The recipient’s Braze external_id, empty when the profile has none. On a SendGrid list, the user id.
The recipient’s Braze external_id, empty when the profile has none. On a SendGrid list, the user id.
The recipient’s Braze profile id. Braze lists only.
The recipient’s Braze profile id. Braze lists only.
The list the link unsubscribes from.
The list the link unsubscribes from.
The edition that carried it. Unsigned provenance.
The edition that carried it. Unsigned provenance.
HMAC-SHA256, hex, under the tenant’s link key: 2|<u>|<b>|<l> on Braze; <email lowercased>|<u>|<l> on SendGrid.
HMAC-SHA256, hex, under the tenant’s link key: 2|<u>|<b>|<l> on Braze; <email lowercased>|<u>|<l> on SendGrid.
Responses
Section titled “Responses”Enqueued.
Invalid request.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Request validation failed.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}Unexpected error.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}With Retry-After, briefly unavailable; without it, not configured.
object
object
Example
{ "error": { "code": "unauthorized", "message": "Invalid or missing API key." }}