Skip to main content
Automation API

exit

Use this action to end an automation run as a success or a failure.

Tip

Read the live config shape of each action type from GET /v1/automation/meta/action before you build on it.

In the automation editor, this action is End run in the Flow control family. Its group is action, and it works with every trigger.

Send it in the actions array of Create an automation or Update an automation. An update replaces the whole array, so include the other actions.

Example​

Inside the else branch of a conditional, this action stops the run as failed when a job application has no CV attached:

{
"type": "exit",
"config": {
"exit_type": "failure"
}
}

Config​

PropertyTypeDescriptionExample value
exit_typeenumRequired. How the run ends: success or failure."success"

General behavior​

  • exit_type is the only key, and it's required. It has no default, because a successful end and a failed end mean different things.
  • Tape stops the run at this action. Later actions don't run.
  • success ends the run with status completed.
  • failure ends the run with status failed and failure_reason: "exit_on_purpose". The run object tells this deliberate stop apart from an action error, which has a different failure_reason.

Requirements​

  • To add or change this action through the API, your token needs the automations:edit capability. See Capabilities.
  • You must administer the workspace that the automation's database app belongs to.

Next steps​