Unsubscribe from marketing email
curl --request POST \
--url https://my.server.express/api/v1/unsubscribe \
--header 'Content-Type: application/json' \
--data '
{
"u": "<string>",
"t": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({u: '<string>', t: '<string>'})
};
fetch('https://my.server.express/api/v1/unsubscribe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/unsubscribe"
payload = {
"u": "<string>",
"t": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"unsubscribed": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}Public
Unsubscribe from marketing email
One-click unsubscribe from the link in a marketing email. No session needed — the token is an HMAC of the user id, so the link works forever and can’t be pointed at anyone else. Turns off the marketing notification preference (the same toggle Settings uses) and stamps marketingUnsubscribedAt. Billing, security and service emails still go out.
POST
/
v1
/
unsubscribe
Unsubscribe from marketing email
curl --request POST \
--url https://my.server.express/api/v1/unsubscribe \
--header 'Content-Type: application/json' \
--data '
{
"u": "<string>",
"t": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({u: '<string>', t: '<string>'})
};
fetch('https://my.server.express/api/v1/unsubscribe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.server.express/api/v1/unsubscribe"
payload = {
"u": "<string>",
"t": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"unsubscribed": true
}
}{
"success": false,
"error": "<string>"
}{
"success": false,
"error": "<string>"
}