Skip to main content

Create automation

curl -X POST http://localhost:6877/automations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Morning briefing",
    "description": "Summarize unread emails and today calendar",
    "trigger_type": "time",
    "at": "09:00",
    "days": "weekdays"
  }'
Notifier configuration is separate from automation creation. Use the notification/notifier settings or /notifiers/* endpoints.

Trigger options

Scheduled:
{"type": "time", "at": "09:00", "days": "weekdays"}
{"type": "time", "at": "22:00", "days": "mon,wed,fri"}
{"type": "time", "at": "08:00"}
Interval:
{"type": "time", "every": "2h"}
{"type": "time", "every": "30m", "start": "09:00", "end": "18:00"}
Event-driven:
{"type": "event", "event_type": "event_approaching", "lead_minutes": 15}
Idle:
{"type": "idle", "idle_minutes": 5}
Count:
{"type": "count", "every_n": 3}

Multi-trigger

Pass a triggers array to combine multiple triggers with OR logic:
curl -X POST http://localhost:6877/automations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Extract facts",
    "description": "Extract facts from recent conversation",
    "triggers": [
      {"type": "count", "every_n": 5},
      {"type": "idle", "idle_minutes": 10}
    ],
    "cooldown_minutes": 10
  }'

List automations

curl http://localhost:6877/automations \
  -H "Authorization: Bearer $API_KEY"

Get automation

curl http://localhost:6877/automations/1 \
  -H "Authorization: Bearer $API_KEY"

Update automation

curl -X PATCH http://localhost:6877/automations/1 \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"description": "New task description"}'

Toggle enable/disable

curl -X POST http://localhost:6877/automations/1/toggle \
  -H "Authorization: Bearer $API_KEY"

Toggle auto-approve

Allow a headless automation to skip per-call approval for mutating/external tools that would normally require user approval:
curl -X POST http://localhost:6877/automations/1/auto-approve \
  -H "Authorization: Bearer $API_KEY"
The response includes the updated auto_approve value.

Run immediately

curl -X POST http://localhost:6877/automations/1/run \
  -H "Authorization: Bearer $API_KEY"

Runs and events

curl http://localhost:6877/automations/1/runs \
  -H "Authorization: Bearer $API_KEY"

curl http://localhost:6877/automations/events \
  -H "Authorization: Bearer $API_KEY"

Suggestions

curl http://localhost:6877/automations/suggestions \
  -H "Authorization: Bearer $API_KEY"

curl -X POST http://localhost:6877/automations/suggestions/refresh \
  -H "Authorization: Bearer $API_KEY"

Delete automation

curl -X DELETE http://localhost:6877/automations/1 \
  -H "Authorization: Bearer $API_KEY"