Skip to main content
POST
Publish Automation

Yetkilendirmeler

Authorization
string
header
gerekli

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:manage

Başlıklar

Idempotency-Key
string

A unique key that makes this request safe to retry. See Idempotent requests.

Maximum string length: 255
Örnek:

"d9105228-4a08-46b1-8b91-42fed586d383"

Api-Version-Date
string

Pins the request to a dated API version.

Örnek:

"2026-11-17"

Yol Parametreleri

id
string
gerekli

Automation ID, prefixed ato_.

Yanıt

Automation published

account_id
string
gerekli

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

Örnek:

"biz_xxxxxxxxxxxxxx"

active_enrollments_count
integer
gerekli

Members currently in the automation.

Örnek:

0

created_at
string
gerekli

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

Örnek:

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

created_by_actor
object
gerekli

Who created the automation.

draft_version
integer
gerekli

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

Örnek:

2

has_unpublished_changes
boolean
gerekli

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

Örnek:

false

id
string
gerekli

Automation ID, prefixed ato_.

Örnek:

"ato_xxxxxxxxxxxxxx"

name
string
gerekli

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

Örnek:

"After an order"

published_at
string | null
gerekli

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

Örnek:

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

published_by_actor
object | null
gerekli

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

published_version
integer | null
gerekli

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

Örnek:

1

secret_names
string[]
gerekli

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

status
enum<string>
gerekli

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.

Mevcut seçenekler:
active,
closed,
stopped
Örnek:

"active"

total_enrollments_count
integer
gerekli

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

Örnek:

0

trigger_event
enum<string> | null
gerekli

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.

Mevcut seçenekler:
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
Örnek:

"payment.succeeded"

updated_at
string
gerekli

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

Örnek:

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