PATCH
/api/public/v1/notification-preferencesUpdate notification preferences
`categoryPreferences` is keyed by notification category, each value saying whether email and SMS are wanted for it. A category absent from the object is **on** — that is what makes a new notification type work for everybody without a backfill, so send the whole object rather than expecting an omission to mean "off".
Required scope
The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.
notifications:write
Request Body
| Property | Type | Description |
|---|---|---|
emailDigestMode | string | How often email goes out. |
categoryPreferences | object | Replaces the whole object. An absent category is on. |
PATCHExample request
curl
curl -X PATCH "https://www.pxb.app/api/public/v1/notification-preferences" \
-H "Authorization: Bearer your_access_token" \
-H "Content-Type: application/json" \
-d '{
"emailDigestMode": "DAILY"
}'200Example response
json
{
"message": "Notification preferences updated successfully!",
"content": {
"preference": {
"emailDigestMode": "DAILY",
"categoryPreferences": {}
}
}
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.
Settings → Notifications
/settings/notifications- Open Notifications.
- Toggle a category, or change the digest mode.