Skip to main content
POST
Activate an automation
Activating an automation publishes its pending changes and moves the status to live. Your API key needs the automations:activate scope and access to the account in the request body. Send the automation ID in the path. Send account_id and the automation’s latest updated_at value as expected_updated_at in the body. Both fields are required and no other field is accepted. A successful request returns 200 with the published automation and its complete typed configuration.

Validation happens before publication

Activation validates the stored draft against the public automation contract before it publishes anything. When the draft cannot run, the API returns 422 with api_automation_invalid_configuration and leaves the automation untouched. Read error.details.issues for the failing path, code, and message, then send a corrected configuration through Update an automation. When the account plan does not cover the configured trigger, the configured action, or the number of active automations, the API returns 402 with api_automation_plan_limit. The machine-readable cause is in error.details.reason.

Protect concurrent changes

Read the automation immediately before you activate it, then send its exact updated_at value. If the automation changed after that read, the API returns 409 with api_automation_version_conflict. Read the automation again and build a new request from the value it returns.

Example request

This operation is not idempotent. Do not retry it automatically after an unknown response.
If the API returns api_automation_committed_response_unavailable with committed: true and retryable: false, the automation was activated but the API could not verify the response. Read the automation before taking another action.

Example success response

Illustrative IDs, timestamps, and content. HTTP 200.

Authorizations

Authorization
string
header
required

Levios API key sent as a Bearer token.

Path Parameters

automationId
string<uuid>
required

Body

application/json
account_id
string<uuid>
required
expected_updated_at
string
required
Required string length: 20 - 32
Pattern: ^(?:(?:(?!0000)\d{4})-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|02-(?:0[1-9]|1\d|2[0-8]))|(?:(?!0000)(?:\d{2}(?:0[48]|[2468][048]|[13579][26])|(?:[02468][048]|[13579][26])00))-02-29)T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,6})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$

Response

Successful response.