Skip to main content
PATCH
Update Automation

Autorisaties

Authorization
string
header
vereist

An Account API key, an App API key, an account access token, an account-scoped user token, or a user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.

Scopes

automation:write

Headers

Api-Version-Date
string

Pins the request to a dated API version.

Voorbeeld:

"2026-11-17"

Padparameters

id
string
vereist

Automation ID, prefixed ato_.

Body

application/json
name
string

The automation's name, shown on the dashboard. Up to 255 characters.

Voorbeeld:

"Still running"

secrets
object

Secrets to set, by name, merged into the automation's: a name set to null is removed. Step code reads them as environment variables, and no endpoint returns their values. Names are uppercase letters, digits and underscores, starting with a letter, up to 64 characters. Up to 50 secrets, each up to 4 KB.

Voorbeeld:
status
enum<string>

active enrolls members and runs their steps. closed stops new enrollments and lets members already in it finish. stopped stops new enrollments and ends every member's enrollment. active and closed need a published version.

Beschikbare opties:
active,
closed,
stopped
Voorbeeld:

"stopped"

trigger_event
enum<string> | null

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.

Beschikbare opties:
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,
null
Voorbeeld:

"payment.succeeded"

Respons

Automation updated

account_id
string
vereist

ID of the account the automation belongs to, prefixed biz_.

Voorbeeld:

"biz_xxxxxxxxxxxxxx"

active_enrollments_count
integer
vereist

Members currently in the automation.

Voorbeeld:

0

created_at
string
vereist

When the automation was created, as an ISO 8601 timestamp.

Voorbeeld:

"2026-01-01T12:00:00.000Z"

created_by_actor
object
vereist

Who created the automation.

draft_version
integer
vereist

The version that step edits change. Always published_version plus one, or 1 before the first publish.

Voorbeeld:

2

has_unpublished_changes
boolean
vereist

Whether the draft has edits that POST /automations/{id}/publish would publish. Always true before the first publish.

Voorbeeld:

false

id
string
vereist

Automation ID, prefixed ato_.

Voorbeeld:

"ato_xxxxxxxxxxxxxx"

name
string
vereist

The automation's name, shown on the dashboard. Up to 255 characters.

Voorbeeld:

"After an order"

published_at
string | null
vereist

When the automation was last published, as an ISO 8601 timestamp. null until its first publish.

Voorbeeld:

"2026-01-01T12:00:00.000Z"

published_by_actor
object | null
vereist

Who last published the automation. null until its first publish.

published_version
integer | null
vereist

The version new members start on. null until the automation is first published.

Voorbeeld:

1

secret_names
string[]
vereist

Names of the automation's secrets, which its steps' code reads as environment variables. Their values are never returned.

status
enum<string>
vereist

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.

Beschikbare opties:
active,
closed,
stopped
Voorbeeld:

"active"

total_enrollments_count
integer
vereist

How many times members have enrolled in the automation, including enrollments that have ended.

Voorbeeld:

0

trigger_event
enum<string> | null
vereist

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.

Beschikbare opties:
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,
null
Voorbeeld:

"payment.succeeded"

updated_at
string
vereist

When the automation was last updated, as an ISO 8601 timestamp.

Voorbeeld:

"2026-01-01T12:00:00.000Z"