Skip to main content
PATCH
Bulk toggle the current user’s subscription states

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-User-Token
string
header
required

Short-lived signed token that scopes the call to one user. 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 user bound to the session.

Paginated response of UserSubscriptionList.

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.