Skip to main content
A member enrolls when the automation’s trigger_event happens to them, such as payment.succeeded. You can also enroll a member with POST /automations/{id}/trigger. A wait step holds them for a set time. An email or message step runs its source_code, a TSX module that reads the member’s data through the API. The module decides whether to send and what to say. Steps are versioned. You edit the draft version. POST /automations/{id}/publish makes it the version new members start on, then copies it into the next draft. Each publish moves members already in the automation onto the new version. Use the Automations API to create, publish and trigger automations, and to update them, including their status. Use the Automation steps and Automation enrollments APIs for their steps and members.

Endpoints

Attributes

string
required
Automation ID, prefixed ato_.
string
required
ID of the account the automation belongs to, prefixed biz_.
integer
required
Members currently in the automation.
string
required
When the automation was created, as an ISO 8601 timestamp.
object
required
Who created the automation.

Properties

string
required
ID of the user, account or app, prefixed user_, biz_ or app_.
string
required
What acted: a user, an account through one of its API keys, or an app.Available options: user, account, app
integer
required
The version that step edits change. Always published_version plus one, or 1 before the first publish.
boolean
required
Whether the draft has edits that POST /automations/\{id}/publish would publish. Always true before the first publish.
string
required
The automation’s name, shown on the dashboard. Up to 255 characters.
string | null
required
When the automation was last published, as an ISO 8601 timestamp. null until its first publish.
object | null
required
Who last published the automation. null until its first publish.

Properties

string
required
ID of the user, account or app, prefixed user_, biz_ or app_.
string
required
What acted: a user, an account through one of its API keys, or an app.Available options: user, account, app
integer | null
required
The version new members start on. null until the automation is first published.
string[]
required
Names of the automation’s secrets, which its steps’ code reads as environment variables. Their values are never returned.
string
required
active enrolls members and runs their steps. closed enrolls no one new, and members already in it finish. stopped enrolls no one, and its members’ enrollments have ended. A new automation is stopped until its first publish makes it active.Available options: active, closed, stopped
integer
required
How many times members have enrolled in the automation, including enrollments that have ended.
string | null
required
The webhook event that enrolls the member it’s about, such as payment.succeeded. null for an automation that only POST /automations/\{id}/trigger enrolls into. Fixed once the automation has been published.Available options: payment.succeeded, payment.failed, membership.activated, membership.trial_ending_soon, member.created, invoice.created, invoice.paid, invoice.past_due, refund.created, dispute.created, resolution_center_case.created, resolution_center_case.decided, course_lesson_interaction.completed
string
required
When the automation was last updated, as an ISO 8601 timestamp.
Automation