Skip to main content
PATCH
/
subscriptions
/
me
Bulk toggle the current contact’s subscription states
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.

Authorizations

Authorization
string
header
required

Project-scoped publishable key (pk_…). Safe for browser use. Allowed only on a strict allow-list of endpoints.

X-Spotzee-Contact-Token
string
header
required

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.

Body

application/json
Required array length: 1 - 100 elements
subscription_id
integer
required

Numeric subscription-type identifier to toggle.

Example:

7

state
required

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.

Available options:
0
Example:

1

Response

The refreshed subscription states for the contact bound to the session.

Paginated response of ContactSubscriptionList.

results
object[]
required

Page of results, ordered per the request’s sort and direction.

nextCursor
string | null
required

Opaque cursor for the next page. null when no further pages exist.

prevCursor
string | null
required

Opaque cursor for the previous page. null when on the first page.

limit
integer
required

Page size used to build this response.