Publish Automation
Changed onPublishes the draft version: new members start on it, and the automation becomes active. Members already in the automation move onto it. A member stays on the same step when it's still there. When the draft removed that step, the member moves to the step that now follows the nearest earlier step the draft kept. The draft is then copied into the next draft version, whose steps get new IDs and keep their key. Every draft step's issues must be empty. When the draft has no edits since the last publish, no new version is made. Publishing then only makes a closed or stopped automation active again. The account must have Economic Intelligence turned on.
Request
- Base URLhttps://api.whop.com/api/v1
- AuthHTTP bearer
Path parameters
Automation ID, prefixed ato_.
Headers
Pins the request to a dated API version.
A unique key that makes this request safe to retry. See Idempotent requests.
Response
Automation published
ID of the account the automation belongs to, prefixed biz_.
Members currently in the automation.
When the automation was created, as an ISO 8601 timestamp.
Who created the automation.
The version that step edits change. Always published_version plus one, or 1 before the first publish.
Whether the draft has edits that POST /automations/{id}/publish would publish. Always true before the first publish.
Automation ID, prefixed ato_.
The automation's name, shown on the dashboard. Up to 255 characters.
When the automation was last published, as an ISO 8601 timestamp. null until its first publish.
The version new members start on. null until the automation is first published.
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.
How many times members have enrolled in the automation, including enrollments that have ended.
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.
When the automation was last updated, as an ISO 8601 timestamp.
Example response
{
"account_id": "biz_xxxxxxxxxxxxxx",
"created_at": "2026-01-01T12:00:00.000Z",
"created_by_actor": {
"id": "biz_xxxxxxxxxxxxxx",
"resource_type": "account"
},
"draft_version": 2,
"id": "ato_xxxxxxxxxxxxxx",
"name": "After an order",
"published_at": "2026-01-01T12:00:00.000Z",
"published_by_actor": {
"id": "biz_xxxxxxxxxxxxxx",
"resource_type": "account"
},
"published_version": 1,
"secret_names": [
"SHOP_TOKEN"
],
"status": "active",
"trigger_event": "payment.succeeded",
"updated_at": "2026-01-01T12:00:00.000Z"
}Changes
- warning
added the new
membership.cancel_at_period_end_changedenum value to thetrigger_eventresponse property for the response status
- warning
- breaking
removed the required property
created_by_actor/objectfrom the response with the status - breaking
removed the required property
published_by_actor/oneOf[#/components/schemas/AutomationActor]/objectfrom the response with the status
2 more changes in this revision
- breaking