Skip to main content
POST
Create a new automation

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required
description
string
required
event
string
actions
object
sourceStatuses
string[]
maxTransitions
number
enabled
boolean

Sets the calling user's per-automation preference (stored on User.automations[id]). Defaults to true when omitted. Does NOT set a global flag on the Automation; other users see no preference until they call PATCH /{id}/preference.

triggerType
string
conditions
object[]
triggerLogicType
string

Either "event" or "timer"

timerLogic
object
schedule
object
maxFollowUpCount
number
Required range: x >= 1

Response

Automation created successfully

Returned by POST /api/automations and PUT /api/automations/{id} — wraps the created/updated AutomationDocument plus a status message.

success
enum<boolean>
required
Available options:
true
message
string
required
data
object
required

An Automation document with two derived per-user fields: enabled (from User.automations[id]) and userSmsNotification (per-user SMS settings).

Example: