Update a subscriber's notification preferences.
PUT/v1/users/:subscriberId/preferences
This is how you honour opt-outs. The workers read these preferences from Postgres immediately before dispatching, so a suppressed channel is never attempted and never billed.
The write is a merge, not a replace, one level deep: a channel you omit
keeps its current value, and a category you send replaces that category's
flags wholesale. To re-enable a channel, send it explicitly as true.
Merging happens inside Postgres rather than as a read-modify-write, so two concurrent updates to different channels cannot lose each other.
Request
Responses
- 200
- 400
- 401
- 500
Preferences stored
Neither channels nor categories was supplied
Missing or invalid API key
The preference store is unavailable — nothing was written