Skip to navigation

Update the status of an automation workflow

View as Markdown

Activates (active), pauses (pause) or stops (inactive) an automation workflow.

  • active starts it for real contacts. Before activating, resolve the warnings returned when the workflow was created (for example an email template with no sender).
  • pause stops new contacts from entering. The contacts already in the workflow continue through it.
  • inactive stops the workflow, and every contact still in it leaves it. This cannot be undone for those contacts.

A status change is applied asynchronously: while the previous one is still running, the request is refused with 409 status_change_in_progress; wait the Retry-After seconds and read the workflow to see its status.

Some refusals currently come back as {"error": "<text>"}, without code and message: see the 400 and 500 responses.

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

OR
AuthorizationBearer

OAuth 2.0 client_credentials (machine-to-machine) grant. Exchange your app’s client_id/client_secret for a short-lived Bearer token.

Path parameters

workflowIdlongRequired>=1
ID of the automation workflow

Request

The new status. No other field is accepted.
statusenumRequired

active starts the automation for real contacts; pause stops new contacts from entering while the contacts already in it continue; inactive stops it, and every contact still in it leaves the automation

Allowed values:

Response

Status updated
statusbooleanOptional
True when the status changed
reasonstringOptional
Why the status was not changed, when it was not

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error
503
Service Unavailable Error