Skip to main content
Update Notification Preferences
Upserts the acting user’s push notification preferences. The request replaces the whole disabled-types set — send the complete set you want stored, not a delta. Duplicates are collapsed; only valid event type names are accepted. Requires authentication. Acting-user-scoped: an end-user token (Authorization: Bearer <accessToken>) writes its own preferences. A service key acts on behalf of a named user via the body actingUserId — a service key without actingUserId is rejected, and an end-user token must not send it. Requires the push bundle.

Body Parameters

string[]
required
The complete set of event types to disable for push. Each value must be one of the server’s exact event type names (see the event palette) — unknown names are rejected. Pass [] to re-enable everything (all-on).
string
Service key only, and required with one: the user this request acts as. Their preferences are written. A user token always acts as its own user and must not send it (400 notification-preferences/acting-user-not-allowed).

Response

Returns 200 with the stored set (deduplicated).

Error Responses

Plain-text Unauthorized, with no JSON body and no code. Returned when the request carries no Authorization header at all.
Plain-text Forbidden, with no JSON body and no code. Returned when the access token is malformed, has the wrong signature, or has expired — the common case, since access tokens live 30 minutes. Refresh the access token and retry.
Returned when a user token sends actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.
With a service key:
With a user token, or with no credentials:
Returned when the request sends userId. On this route the user a service key acts as is actingUserId.
Returned when a service key omits the required actingUserId (it has no implicit session user).
Returned when disabledTypes contains a value that is not a recognized event type name.
Returned when the push bundle is not installed for this project.
Returned while the push bundle is mid-install. Retry shortly.
Rate limit: 50 requests per 5 minutes per IP. Exceeding it returns 429 request/rate-limited.

See Also