POST
One-click unsubscribe (RFC 8058)
- Path
/unsubscribe/oneclick/{payload}- Auth
- None · a public or signed link
POST
/unsubscribe/oneclick/{payload}
const url = 'https://releva.ai/api/v0/unsubscribe/oneclick/example';const options = { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({'List-Unsubscribe': 'One-Click'})};
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://releva.ai/api/v0/unsubscribe/oneclick/example \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data List-Unsubscribe=One-ClickCalled by mail clients from the List-Unsubscribe and List-Unsubscribe-Post headers that Releva adds
to every email. The body must be List-Unsubscribe=One-Click. Same effect as POST /unsubscribe.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”payload
required
string
URL-encoded base64 JSON minted by Releva (encrypted secret, email or phone number, redirect URL). Never build it yourself.
Request Bodyrequired
Section titled “Request Bodyrequired”object
List-Unsubscribe
required
string
Example
List-Unsubscribe=One-Clickobject
List-Unsubscribe
required
string
Responses
Section titled “Responses”Unsubscribed. Empty body.
Body missing or not One-Click, or invalid payload.
Media typetext/html
string
Example
Bad RequestThe unsubscribe could not be saved.
Media typetext/html
string
Example
Internal Server Error