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, against the Braze profile u names, 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 profile id.
The recipient’s Braze profile id.
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 of <email lowercased>|<external_id>|<l>, hex, under the tenant’s link key.
HMAC-SHA256 of <email lowercased>|<external_id>|<l>, hex, under the tenant’s link key.
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." }}