ApiUnsubscribes

Apply an unsubscribe token: suppress email for the contact and exit its enrollments

POST
/v1/unsubscribes/{token}

Idempotent: a second call changes nothing and returns already_unsubscribed: true. 400 UNSUBSCRIBE_TOKEN_INVALID or UNSUBSCRIBE_TOKEN_EXPIRED otherwise.

Authorization

projectKey
headerAuthorizationBearer <token>

A project API key (sk_live_…) with read, enroll or admin scope.

Path Parameters

token*string

The signed token from the unsubscribe link.

Length1 <= length <= 2048

Response Body

Default Response

application/json
  1. response
success*true
Value intrue
data*

What an unsubscribe page shows, and what applying a token did.

meta*
curl -X POST 'http://localhost:8080/v1/unsubscribes/string'
{  "success": true,  "data": {    "valid": true,    "expired": true,    "contact": {      "email": "string",      "first_name": "string"    },    "already_unsubscribed": true  },  "meta": {    "request_id": "string"  }}