Skip to navigation

Create automation

Beta

Create an automation asset in the caller’s workspace (or the given one), optionally inside a folder and optionally seeded with a draft definition. Nothing runs until the automation is published. A caller who may not use Automations in the workspace gets a 403 whose detail.reason is not_provisioned, not_permitted or workspace_not_enrolled.

Authentication

X-API-KEYstring
API Key authentication via header

Headers

X-Athena-Session-CredentialstringOptional

Request

This endpoint expects an object.
definitionmap from strings to any or nullOptional

Optional draft definition document (schema_version 2; a schema_version 1 document is upgraded as it is read) to seed the draft with. Shape-validated here; tools, cron and expressions are checked at publish

parent_folder_idstring or nullOptional

Folder to create the automation in (workspace root if omitted)

titlestring or nullOptional
Title of the automation. Defaults to the definition's name, then to 'Untitled Automation'
workspace_idstring or nullOptional

Workspace to create the automation in; the caller’s current workspace when omitted. The caller must be a member, and the workspace must be enrolled in Automations

Response

Automation created
asset_idstring
ID of the new automation asset
principal_refstring

The automation’s own principal; every step runs as it

titlestring
messagestringOptionalDefaults to Automation created successfully
parent_folder_idstring or nullOptional
statusstringOptionalDefaults to created
workspace_idstring or nullOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error