curl --request PATCH \
--url https://apix.spotzee.com/api/client/users/{userId}/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"subscription_id": 7,
"state": 1
}
]
'{
"id": 1024,
"project_id": 42,
"external_id": "cust-9f4b21",
"created_at": "2026-04-28T05:14:00.000Z",
"updated_at": "2026-04-28T05:14:00.000Z",
"anonymous_id": "anon-2c8a3e",
"email": "jane@example.com",
"phone": "+61400123456",
"timezone": "Australia/Sydney",
"locale": "en-AU",
"data": {
"first_name": "Jane",
"last_name": "Doe",
"plan": "pro"
},
"has_push_device": true,
"devices": [
{}
]
}Subscribes or unsubscribes a contact across one or more subscription types in a single call. Up to 100 toggles per request. Toggling to the current state is a no-op (idempotent). The response is the refreshed contact record so callers can confirm the update without a second round-trip.
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/users/{userId}/subscriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"subscription_id": 7,
"state": 1
}
]
'{
"id": 1024,
"project_id": 42,
"external_id": "cust-9f4b21",
"created_at": "2026-04-28T05:14:00.000Z",
"updated_at": "2026-04-28T05:14:00.000Z",
"anonymous_id": "anon-2c8a3e",
"email": "jane@example.com",
"phone": "+61400123456",
"timezone": "Australia/Sydney",
"locale": "en-AU",
"data": {
"first_name": "Jane",
"last_name": "Doe",
"plan": "pro"
},
"has_push_device": true,
"devices": [
{}
]
}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 secret API key (sk_…). Pass in the Authorization: Bearer <key> header. Grants access to the project the key was issued for.
Numeric ID (admin scope) or contact external_id (project scope) — the route resolves both.
"cust-9f4b21"
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 contact, refreshed after the toggle.
A customer record being marketed to. Owned by a project; identified by external_id.
Numeric identifier. Use external_id as the stable cross-system reference.
1024
Identifier of the project this contact belongs to.
42
Stable identifier supplied by the calling system. Treated as the contact’s primary key for upserts.
"cust-9f4b21"
Time the contact was first created. ISO 8601.
"2026-04-28T05:14:00.000Z"
Time the contact was last modified. ISO 8601.
"2026-04-28T05:14:00.000Z"
Anonymous tracking identifier captured before the contact was identified, when available.
"anon-2c8a3e"
Contact’s email address. Format-validated on write.
"jane@example.com"
Contact’s phone number in E.164 format on read.
"+61400123456"
IANA timezone used for time-of-day delivery scheduling.
"Australia/Sydney"
BCP-47 locale used for content rendering.
"en-AU"
True when the contact has at least one registered push device.
Was this page helpful?