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
| Property | Type | Description | Example value |
|---|---|---|---|
exit_type | enum | Required. How the run ends: success or failure. | "success" |
General behavior
exit_typeis 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.
successends the run with statuscompleted.failureends the run with statusfailedandfailure_reason: "exit_on_purpose". The run object tells this deliberate stop apart from an action error, which has a differentfailure_reason.
Requirements
- To add or change this action through the API, your token needs the
automations:editcapability. See Capabilities. - You must administer the workspace that the automation's database app belongs to.