Skip to main content
PUT
Update an existing automation

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Body

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

Updates the calling user's per-automation preference (User.automations[id]). Same semantics as on Create — does NOT toggle a global flag on the Automation. Use PATCH /{id}/preference if you only want to flip the preference without touching the rest of the automation.

triggerType
string
conditions
object[]
triggerLogicType
string

Either "event" or "timer"

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

Response

Automation updated 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: