ClientSphereDocs
API reference/Email Unsubscribes

Record an unsubscribe

Opts an address out of all broadcasts, sequences and automated email. Idempotent, so an unsubscribe link can call it on every click without tracking state.

POST
/email-unsubscribes

Authorization

AuthorizationRequiredBearer <token>

API key as Bearer token: Authorization: Bearer sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

X-API-Key<token>

API key via header: X-API-Key: sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

Request Body

application/jsonRequired
emailRequiredstring
Format: "email"
reasonstring
sourcestring
Default: "api"Value in: "website" | "admin" | "api" | "import"
contactIdstring

Optional. Skips automatic contact resolution when supplied.

Format: "uuid"
curl -X POST "https://clientsphere.io/api/v1/email-unsubscribes" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "person@example.com",
    "reason": "too many emails",
    "source": "website",
    "contactId": "b5ec5d98-4bee-4da1-ad24-dde86346cb1d"
  }'

Address was already unsubscribed; existing record returned

{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda",
    "email": "user@example.com",
    "contactId": "b5ec5d98-4bee-4da1-ad24-dde86346cb1d",
    "source": "website",
    "reason": "string",
    "createdAt": "2019-08-24T14:15:22Z"
  }
}