跳转到内容
EN

Change your notification switches

Code Mode: praxis.organization.notifications.preferences.create

HTTP: POST /organization/v1/notifications/preferences

Set this person’s own notification switches in this organization. Refused with INVALID_PARAMS for an unknown category, a channel the category does not declare, or a channel this deployment has no provider for (nothing is stored that could not take effect); NOT_CONFIGURABLE for a category nobody configures; CRITICAL_CHANNELS_OFF when a critical category would be left with every offered channel off; ORGANIZATION_LOCKED when the organization does not let members change their own switches. A channel the organization blocked is still storable — the block decides, the switch stays theirs.

签名

praxis.organization.notifications.preferences.create(args:{body:{/** Category key → channel → on/off. */ workflows?:{[key:string]:unknown};/** Channels to turn off in every organization. */ channel_opt_outs?:Array<"in_app"|"email"|"sms">}}):Promise<{[key:string]:unknown}>;

请求体

必填内容类型说明
是application/json

响应

状态码内容类型说明
200application/jsonThe stored preferences, in the same shape as the GET.
400Invalid switch, unknown category or unoffered channel — `INVALID_PARAMS`, `NOT_CONFIGURABLE` or `CRITICAL_CHANNELS_OFF` from the service (RFC 9457 problem).
401Missing or invalid credential (RFC 9457 problem).
403The organization does not let members change their own switches — `ORGANIZATION_LOCKED` from the service (RFC 9457 problem).
502The notification service did not answer, or failed in a way it did not classify (RFC 9457 problem, `UNAVAILABLE`). A refusal the service classifies is never a 502 — it reaches the caller in its own class (400, 403, 404), so a client may act on it.