/v1/workspaces/{workspace_id}/recipients/{external_id}/preferencesAuthReplace a recipient's preferences
Sets the complete set of cells: cells you leave out are removed. Most specific wins when sending: type × channel, type × `*`, category × channel, category × `*`, all × channel, then the category default. Calling it again with the same body changes nothing.
Path parameters
workspace_id*string · uuidId of the workspace.
external_id*stringYour user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.
Request body
preferences*arrayThe recipient's complete set of cells: cells not listed are removed (back to the category defaults).
unsubscribed_allbooleanOpt out of every non-critical notification; left out keeps the current value.
Response · 200 The preferences after the change.
external_id*stringThe recipient external id.
unsubscribed_all*booleanOpted out of every non-critical notification.
timezone*stringIANA time zone.
quiet_hours*objectThe recipient's own quiet window; null when they set none (the workspace default then applies, see `effective_quiet_hours`).
effective_quiet_hours*objectThe quiet window that applies: the recipient's own, else the workspace default. Null: no quiet hours apply.
preferences*arrayCells the recipient set (anything else follows the category defaults).
Example
Request
PUT https://api.notify.productcraft.co/v1/workspaces/{workspace_id}/recipients/{external_id}/preferences
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"preferences": [
{
"scope": {},
"key": "billing",
"channel": {},
"enabled": false
}
],
"unsubscribed_all": false
}Response
{
"external_id": "string",
"unsubscribed_all": false,
"timezone": "string",
"quiet_hours": {},
"effective_quiet_hours": {},
"preferences": [
{
"scope": {},
"key": "string",
"channel": {},
"enabled": false
}
]
}