Toggle notification mute
Me
Toggle notification mute
Globally mute or unmute push notifications for the authenticated user. The worker honours this BEFORE consulting individual tokens.
PATCH
Toggle notification mute
Overview
Sets the user’snotificationsMuted boolean. The push-delivery worker consults this flag on every job and skips the send entirely when it’s true — except for jobs with kind: 'critical' (account banned, security alerts, etc.), which bypass the mute. See Push notification fan-out — Mute semantics for the precedence rules.
This is a global mute, not per-conversation. Per-conversation mutes are deferred to a later phase; the data model already has the user-side flag but no UI granularity exists today.
Authentication
Bearer <accessToken> required. requireAuth + requireOnboarded middleware applied.
Path parameters
None.Query parameters
None.Request body
| Field | Type | Required | Notes | Example |
|---|---|---|---|---|
notificationsMuted | boolean | yes | true to suppress all non-critical push for this user. false to resume normal delivery. | true |
Example payload
Response — 200 OK
| Field | Type | Notes | Example |
|---|---|---|---|
success | boolean | Always true. | true |
notificationsMuted | boolean | Echoes the value just set, so the client can update local state without a re-read. | true |
What the mute affects
Push kind | When notificationsMuted: true |
|---|---|
message.new | Skipped by the worker. |
match.new | Skipped. |
tenancy.approved | Skipped. |
critical | Delivered — bypasses the mute. Reserved for security / account-state events that the user MUST see (account banned, password reset confirmation, etc.). Phase 7. |
Side effects
- Sets the user’s
notificationsMutedfield to the new value. - Does NOT cancel already-enqueued push jobs. A burst of messages delivered to BullMQ just before the user mutes may still result in 1–2 already-claimed jobs running, but they’ll be dropped at the worker’s mute check.
Error responses
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_FAILED | notificationsMuted missing or not a boolean. |
| 401 | UNAUTHENTICATED | Missing, malformed, or expired access token. |
| 403 | ONBOARDING_INCOMPLETE | Caller has not finished onboarding. |
Example error — 400 VALIDATION_FAILED
See also
- Push notification fan-out — the worker logic that honours the mute.
- Register push token — the per-device subscription side.