Skip to main content
POST
/
api
/
automations
Create an automation
curl --request POST \
  --url https://operator.io/api/automations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "name": "Daily scoring",
  "prompt": "Score all AQI predictions against yesterday's actuals and report results.",
  "cronExpression": "0 9 * * *",
  "timezone": "America/New_York"
}
EOF
{
  "automation": {
    "id": "<string>",
    "name": "<string>",
    "prompt": "<string>",
    "cronExpression": "<string>",
    "timezone": "<string>",
    "enabled": true,
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

API key (ck_live_...). Create one in Settings > API Keys.

Body

application/json
name
string
required
prompt
string
required

The message sent to the Operator agent when the automation fires.

cronExpression
string
required

Cron expression (e.g. 0 9 * * *).

timezone
string

IANA timezone (e.g. America/New_York). Defaults to UTC.

Response

201 - application/json

Created.

automation
object