curl --request PATCH \
--url https://apix.spotzee.com/api/client/subscriptions/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Spotzee-Contact-Token: <api-key>' \
--data '
[
{
"subscription_id": 7,
"state": 1
}
]
'{
"results": [
{
"subscription_id": 7,
"state": 1,
"name": "Weekly newsletter",
"channel": "email"
}
],
"nextCursor": "<string>",
"prevCursor": "<string>",
"limit": 123
}Subscribes or unsubscribes the contact bound to the calling session token across one or more subscription types. Designed for browser-side preference-centre opt-out flows: pass a publishable key (pk_…) plus a contact session token (see POST /users/{userId}/sessions) in the X-Spotzee-Contact-Token header. Up to 100 toggles per request. Toggling to the current state is a no-op (idempotent).
Idempotent — pass an Idempotency-Key header to make safely retryable. On a replay the original response is returned with Idempotent-Replayed: true. See the API conventions guide for the full state machine, TTL, and mismatch behaviour.
curl --request PATCH \
--url https://apix.spotzee.com/api/client/subscriptions/me \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Spotzee-Contact-Token: <api-key>' \
--data '
[
{
"subscription_id": 7,
"state": 1
}
]
'{
"results": [
{
"subscription_id": 7,
"state": 1,
"name": "Weekly newsletter",
"channel": "email"
}
],
"nextCursor": "<string>",
"prevCursor": "<string>",
"limit": 123
}Documentation Index
Fetch the complete documentation index at: https://docs.spotzee.com/llms.txt
Use this file to discover all available pages before exploring further.
Project-scoped publishable key (pk_…). Safe for browser use. Allowed only on a strict allow-list of endpoints.
Short-lived signed token that scopes the call to one contact. Mint via POST /users/{userId}/sessions (sk_-only). Required alongside a publishable key on the preference-centre endpoints.
1 - 100 elementsNumeric subscription-type identifier to toggle.
7
Subscription state: 0 unsubscribed, 1 subscribed, 2 explicit double-opt-in. Reads return the current state; writes accept any of the three values to set it.
0 1
The refreshed subscription states for the contact bound to the session.
Paginated response of ContactSubscriptionList.
Page of results, ordered per the request’s sort and direction.
Hide child attributes
Numeric subscription-type identifier.
7
Subscription state: 0 unsubscribed, 1 subscribed, 2 explicit double-opt-in. Reads return the current state; writes accept any of the three values to set it.
0 1
Subscription-type name as shown to the caller.
"Weekly newsletter"
Delivery channel the subscription type covers.
"email"
Opaque cursor for the next page. null when no further pages exist.
Opaque cursor for the previous page. null when on the first page.
Page size used to build this response.
Was this page helpful?