Skip to content
中文

Set the organization's notification layer

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

HTTP: POST /organization/v1/notifications/organization_default

Change the organization’s notification layer. Requires an organization owner or admin role; a member answers 403. Refused with INVALID_PARAMS for an unknown or non-configurable category, a channel the category does not declare, or a hidden critical category. Blocking a channel silences it for every member, and a critical category’s mandatory channel still reaches people (ADR-193 §4 layer 1); setting member_may_change false makes these defaults final for members.

Signature

praxis.organization.notifications.organizationDefault.create(args:{body:{/** Category key → channel → on/off, applied where a member said nothing. */ defaults?:{[key:string]:unknown};/** Channels nobody in this organization receives on. */ blocked_channels?:Array<"in_app"|"email"|"sms">;/** Non-critical categories kept off members' settings pages. */ hidden_categories?:Array<string>;/** false makes these defaults final for members; true (the default) lets each member change their own switches. */ member_may_change?:boolean}}):Promise<{[key:string]:unknown}>;

Request body

RequiredContent typesDescription
yesapplication/json

Responses

StatusContent typesDescription
200application/jsonThe stored organization layer.
400Invalid default, unknown category or hidden critical category (RFC 9457 problem, `INVALID_PARAMS`).
401Missing or invalid credential (RFC 9457 problem).
403The caller is not an owner or admin of this organization — `PERMISSION_DENIED` 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.