Skip to main content
POST
Create Notification Trigger

Authorizations

Authorization
string
header
required

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

Body

application/json

Root serializer for POST /v1/notification-triggers.

Thin wrapper over the type-discriminated union so flask-openapi3 can consume it as a body type; callers send the trigger object directly at the top level of the JSON body.

name
string
required

Human-readable name for this trigger instance.

Minimum string length: 1
notificationGroupIds
string[]
required

IDs of the notification groups that will receive notifications when this trigger fires.

type
string
required
Allowed value: "delivery_status_transition"
parameters
DeliveryStatusTransitionParams · object
required
description
string | null

Optional description of the trigger.

enabled
boolean
default:true

Whether the trigger is enabled on creation. Defaults to true.

message
string | null

Optional custom message body.

flag
boolean | null

Whether firing this trigger should also flag the job for operator attention.

autoResolveFlag
boolean | null

If true, a flag raised by this trigger resolves automatically when the flag condition clears.

optionsGroupIds
string[] | null

Options groups that scope when this trigger applies.

contractIds
string[] | null

Contract IDs that scope when this trigger applies.

isInternal
boolean | null

Whether the trigger is for internal use only (not exposed to customers).

zoneIds
string[] | null

Zone IDs that scope when this trigger applies (separate from zone-geolocation parameters).

customEventName
string | null

For triggers that emit a custom event when fired, the name of that event.

Minimum string length: 1
conditionalLogic
Conditionallogic · object | null

Optional AND/OR conditional tree that gates when the trigger fires. Shape mirrors the Zod ConditionalStatement schema in nash-ui; currently passed through as JSON. A follow-up will type this explicitly.

Response

OK

A notification trigger configured on an organization.

id
string
required

Notification trigger ID

type
string
required

Trigger type slug, matching a template from GET /v1/notification-triggers/templates, e.g. 'tasks_attempts_exhausted'.

name
string
required

Human-readable name of this trigger instance

enabled
boolean
required

Whether the trigger is enabled

description
string | null

Trigger description

notificationGroupIds
string[]

Notification group IDs that receive notifications when this trigger fires.