POST https://api.usecommune.comautomation.run.exited Production. There is no separate sandbox host.

Automation run ended early

A run stopped before the end of its graph. data.status says which of the two ways it stopped and data.reason says why.

exited is the ordinary case and is not an error: the subscriber unsubscribed, bounced or complained part way through a sequence, the creator archived the automation, or a live edit removed the step the run was sitting on. failed is a run Commune could not advance and has given up retrying, which is the one that wants a person.

One topic for both, rather than one per status, for the reason article.liked carries both directions: a consumer watching whether its creator's sequences finish needs every early ending, and splitting them would let it subscribe to half and believe it had them all. Route on data.status if the distinction matters.

data.reason is a short Commune-chosen code for an exited run (subscriber_unsubscribed, step_removed, automation_archived, sender_not_verified, and others; the set grows as the engine learns new ways to stop) and the last error text for a failed one. New codes are not a breaking change, so treat an unrecognised one as "ended, for a reason I do not handle" rather than as a parse failure.

No message is published for a run the loop guard refused, because no run was created and there would be no run_id to name. See automation.run.completed on how the guard reads actor.

Delivered as a single HTTPS POST to the consumer's registered endpoint, with the message as the JSON request body. Respond 2xx to acknowledge. Anything else, or a timeout, is retried with backoff, so acknowledge fast and do the work afterwards.

Request Headers

  • string Required
  • string(uuid) Required
  • string Required
  • string Required
  • string(date-time) Required
  • integer

Body

A run stopped before the end of its graph, deliberately or because Commune gave up advancing it.

  • string(uuid) Required
  • string Required
  • string Required
  • string(date-time) Required
  • string(uuid) | null Required
  • string | null Required
POST automation.run.exited
Loading...

Share your request

Use this link to easily share a pre-filled request of this operation. Everything you filled will be shared apart from the authentication fields.

Request URL

https://api-reference.usecommune.dev/explorer/operation/operation-onautomationrunexited

Send a delete request

It looks like you’re about to send a DELETE request to this API. This type of request carries a risk of permanent and irreversible data loss.

Are you sure you want to continue?
Response
Waiting for a request to be sent.