SnozeDevelopers
API referenceNotifications

Create or update a notification preference

Upserts one preference for the caller, keyed by channel plus its optional workspace, category, or kind override, so re-sending the same body is idempotent. A preference may override a category or a kind but not both, and an enabled channel needs a real cadence while a disabled one must use `never`. Scoping the preference to a `workspaceId` requires `workspace:read` there and accepts an `Idempotency-Key` header.

PUT
/v1/notification-preferences

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Request Body

application/json
  1. body
workspaceId?string|null
category?|null
kind?|null
channel*string
Value in"in_app""email""push"
enabled*boolean
cadence*string
Value in"immediate""hourly_digest""daily_digest""never"

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X PUT 'https://api.snoze.dev/v1/notification-preferences' \  -H 'Content-Type: application/json' \  -d '{  "channel": "in_app",  "enabled": true,  "cadence": "immediate"}'
Example Response
{  "data": {    "id": "string",    "workspaceId": "string",    "category": "collaboration",    "kind": "comment",    "channel": "in_app",    "enabled": true,    "cadence": "immediate"  }}