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.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
application/json- body
workspaceId?string|nullcategory?|nullkind?|nullchannel*string"in_app""email""push"enabled*booleancadence*string"immediate""hourly_digest""daily_digest""never"Success
application/json- response
data*curl -X PUT 'https://api.snoze.dev/v1/notification-preferences' \ -H 'Content-Type: application/json' \ -d '{ "channel": "in_app", "enabled": true, "cadence": "immediate"}'{ "data": { "id": "string", "workspaceId": "string", "category": "collaboration", "kind": "comment", "channel": "in_app", "enabled": true, "cadence": "immediate" }}List the caller's notification preferences
Returns every notification preference the caller has saved: the delivery channel, whether it is enabled, its cadence, and the workspace, category, or kind it overrides. Scoped to the authenticated user, so no workspace permission is involved.
Read the caller's push registration for an installation
Returns the caller's active push registration for one app installation — platform, app and project ids, a fingerprint of the token, and when it was last registered — or null when none is active. The raw Expo token is never returned. Requires a Clerk session with a synced profile; API keys are rejected.