Skip to main content
POST
Enable or disable an automation trigger

Authorizations

Authorization
string
header
required

JWT token authentication

Headers

NexSpace-Version
string

Pin the request to a dated API version (e.g. 2026-05-10). Applied by app-level middleware to every /api route (server/routes/index.ts → apiVersionMiddleware), which echoes the resolved value back in the NexSpace-Version response header. Omit to get the latest version. Discover the catalog at GET /.well-known/api-versions.

Pattern: ^\d{4}-\d{2}-\d{2}$
Idempotency-Key
string

Replay guard for write requests. Applied by app-level middleware to every /api route (server/routes/index.ts → idempotencyMiddleware), which only acts on POST/PUT/PATCH — GET, DELETE and OPTIONS ignore the header. Re-sending the same key with an identical body within 24 hours replays the original response; the same key with a different body returns 409.

Maximum string length: 255

Path Parameters

id
integer
required
triggerId
integer
required

Body

application/json
isActive
boolean
required

Response

Trigger updated

An automation trigger that fires an agent on a schedule or event.

id
integer
required
agentDefinitionId
integer
required
triggerType
enum<string>
required
Available options:
schedule,
event,
manual,
webhook
cronExpression
string | null

5-field cron; required for schedule triggers.

timezone
string | null

IANA timezone for cron evaluation (defaults to UTC).

eventType
string | null

Business event name; required for event triggers (e.g. shift.ncns).

eventFilters
object

Equality filters (dot-path) the event payload must satisfy.

runAsUserId
integer | null

Identity the run acts as (drives tool scope + RBAC).

facilityId
integer | null
seedMessage
string | null
isActive
boolean
lastRunAt
string<date-time> | null
nextRunAt
string<date-time> | null
consecutiveFailures
integer

Auto-disabled after 5 consecutive schedule-dispatch failures.