Notify API reference

Notify API · Client

patch/v1/client/preferencesAuth

Update my preferences

Sets or (with `enabled: null`) removes individual cells, and the time zone, quiet hours and unsubscribe-all. Cells you leave out are kept, so two open tabs cannot overwrite each other. Every change is recorded as consent evidence (source `recipient_token`).

Request body

preferencesarray

Cells to set, or (with `enabled: null`) remove; other cells are kept, so two open tabs cannot overwrite each other.

unsubscribed_allboolean

Opt out of (or back into) every non-critical notification.

timezonestring

IANA time zone (quiet hours).

Example: "Europe/Lisbon"

quiet_hoursobject

Quiet window; null removes it.

Response · 200 The preferences after the change.

categories*array

The workspace's categories in display order, with their defaults.

preferences*array

Cells the recipient set (anything else follows the category defaults).

unsubscribed_all*boolean

Opted out of every non-critical notification.

timezone*string

IANA time zone.

quiet_hours*object

The recipient's own quiet window; null when they set none (the workspace default then applies, see `effective_quiet_hours`).

effective_quiet_hours*object

The quiet window that applies: the recipient's own (`source: recipient`), else the workspace default (`source: workspace`). Null: no quiet hours apply. Show this, not `quiet_hours`, as the current state; setting `quiet_hours` replaces the default for this recipient.

Example

Request

PATCH https://api.notify.productcraft.co/v1/client/preferences
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "preferences": [
    {
      "scope": {},
      "key": "billing",
      "channel": {},
      "enabled": false
    }
  ],
  "unsubscribed_all": false,
  "timezone": "Europe/Lisbon",
  "quiet_hours": {}
}

Response

{
  "categories": [
    {
      "key": "billing",
      "name": "string",
      "description": "string",
      "defaults": {}
    }
  ],
  "preferences": [
    {
      "scope": {},
      "key": "string",
      "channel": {},
      "enabled": false
    }
  ],
  "unsubscribed_all": false,
  "timezone": "string",
  "quiet_hours": {},
  "effective_quiet_hours": {}
}