Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ntrp.io/llms.txt

Use this file to discover all available pages before exploring further.

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",
    "notifiers": ["telegram"]
  }'

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 (with optional time window):
{"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 (fires after user inactivity):
{"type": "idle", "idle_minutes": 5}
Count (fires every N user messages):
{"type": "count", "every_n": 3}

Multi-trigger

Pass a triggers array to combine multiple triggers (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
  }'
The cooldown_minutes field prevents an automation from firing again too soon after a run.

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 writable

Allow the automation to modify data (memory, emails, calendar, and other connected services):
curl -X POST http://localhost:6877/automations/1/writable \
  -H "Authorization: Bearer $API_KEY"

Run immediately

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

Delete automation

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