PUT
Configure a notification type
Company space For: Everyone · Permission: notification_settings.configure Conditions
  • Company routes only.
  • notification_type in the path must be a known type (awaiting_approval or stock_alert); otherwise validation answers 422.
  • channels is required with at least one entry; each channel must be given once, be one of in_app or email, be supported by the type, and carry an enabled boolean.
  • For a permission-backed type (awaiting_approval, whose recipients are the holders of orders.approve) internal_recipients and channel_recipient_values are refused whenever the key is present, even empty; only enabled can be changed.
  • For a recipient-configured type (stock_alert), agent_ids are refused on the email channel; channel_recipient_values are accepted only on email and each must be a valid email address.
  • Every user_profile_ids and agent_ids entry must exist in the company of the session.
What else happens
  • Creates or updates one setting per submitted channel (enabled flag); channels not in the payload are untouched and settings are never deleted when disabled.
  • For a recipient-configured type, replaces all internal recipients and external email values of each submitted channel with the lists sent; a list that is omitted clears that channel’s recipients. Duplicate ids or values are collapsed.
  • Future notifications of this type are delivered according to these settings.
Part of Your account and notifications.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

notification_type
string
required

Type of notification to configure. Accepted values are awaiting_approval (permission-backed: recipients are holders of orders.approve) and stock_alert (recipients are chosen in the settings).

Body

application/json
notification_type
enum<string>
required

Not accepted in the body: it comes from the notification_type path segment and must be awaiting_approval or stock_alert.

Available options:
awaiting_approval,
stock_alert
channels
object[]
required

Channels to configure. Required, at least one. Only the channels sent are changed.

Minimum array length: 1

Response

NotificationSettingResource

notification_type
string
required

Type of notification: awaiting_approval or stock_alert.

label
string
required

Translated display name of the type.

built_in_permissions
array
required

Permissions a person must hold to receive this type. Non-empty means the type is permission-backed and recipients cannot be chosen; empty means recipients are configured per channel.

channels
array
required

One entry per channel the type supports (in_app, email) with enabled, supports_internal_recipients, allowed_internal_recipient_types, supports_channel_recipients, internal_recipients and channel_recipient_values. A channel never configured shows enabled false.