Skip to content

Generated from api/openapi.yaml (OpenAPI 3.1). Base URL: https://api.teemli.com. Auth: Authorization: Bearer <token or tml_ API key>. Errors are application/problem+json; writes accept an Idempotency-Key header.

Standing work on a schedule, once, on an event (email, webhook, app event) or until a goal is met; run history

My routines (and those of AI employees I manage)

Section titled “My routines (and those of AI employees I manage)”
GET /v1/orgs/{org}/routines

API keys: needs the agents:read scope.

Parameter In Type Description
org (required) path string (uuid) The caller’s organisation id.
agent_id query string (uuid)
status query active, paused, completed, all Default: everything but disabled

Responses

  • 200 Routines, newest first — object
  • 401 Missing, invalid or expired token — Problem

Create a routine with the form (no confirm card — it’s the person’s own act)

Section titled “Create a routine with the form (no confirm card — it’s the person’s own act)”
POST /v1/orgs/{org}/routines

Validated as a whole: cron in the routine’s time zone (default the person’s), at least TEEMLI_ROUTINE_MIN_INTERVAL_MINUTES apart; caps per person and per agent. Agents propose routines with routine.create instead, which the person confirms on a setup_change card. Webhook routines return webhook_url with its secret once.

API keys: needs the agents:write scope.

Parameter In Type Description
org (required) path string (uuid) The caller’s organisation id.

Request body (JSON)

Field Type Description
agent_id (required) string (uuid)
title string
instructions string What to do on each run (each run is a new task)
trigger schedule, once, event, goal
cron string \ null
schedule_text string \ null
run_at string \ null
time_zone string \ null
event_source email, webhook, composio, null Slack/Teams phrases arrive with M5
composio_trigger string \ null
connection_id string \ null (uuid)
event_filter object \ null
goal string \ null
check_every_minutes integer \ null
give_up_after_days integer \ null
deliver_to task, conversation, null task (default) or also post the result in the agent’s chat

Responses

  • 201 Created — object
  • 401 Missing, invalid or expired token — Problem
  • 404 Not found (also returned for rows the caller may not see, and for disabled features) — Problem
  • 422 Invalid input — Problem
GET /v1/orgs/{org}/routines/{routine}

API keys: needs the agents:read scope.

Parameter In Type Description
org (required) path string (uuid) The caller’s organisation id.
routine (required) path string (uuid)

Responses

  • 200 The routine — Routine
  • 401 Missing, invalid or expired token — Problem
  • 404 Not found (also returned for rows the caller may not see, and for disabled features) — Problem

Change fields (validated as a whole), or pause/resume (status)

Section titled “Change fields (validated as a whole), or pause/resume (status)”
PATCH /v1/orgs/{org}/routines/{routine}

Resuming recomputes the next run and clears the failure count.

API keys: needs the agents:write scope.

Parameter In Type Description
org (required) path string (uuid) The caller’s organisation id.
routine (required) path string (uuid)

Request body (JSON)

Field Type Description
status active, paused
title string
instructions string What to do on each run (each run is a new task)
trigger schedule, once, event, goal
cron string \ null
schedule_text string \ null
run_at string \ null
time_zone string \ null
event_source email, webhook, composio, null Slack/Teams phrases arrive with M5
composio_trigger string \ null
connection_id string \ null (uuid)
event_filter object \ null
goal string \ null
check_every_minutes integer \ null
give_up_after_days integer \ null
deliver_to task, conversation, null task (default) or also post the result in the agent’s chat

Responses

  • 200 The routine — Routine
  • 401 Missing, invalid or expired token — Problem
  • 404 Not found (also returned for rows the caller may not see, and for disabled features) — Problem
  • 422 Invalid input — Problem

Delete (app-event routines also unsubscribe)

Section titled “Delete (app-event routines also unsubscribe)”
DELETE /v1/orgs/{org}/routines/{routine}

API keys: needs the agents:write scope.

Parameter In Type Description
org (required) path string (uuid) The caller’s organisation id.
routine (required) path string (uuid)

Responses

  • 204 Deleted
  • 401 Missing, invalid or expired token — Problem
  • 404 Not found (also returned for rows the caller may not see, and for disabled features) — Problem

Run now (a new task; the schedule is unchanged)

Section titled “Run now (a new task; the schedule is unchanged)”
POST /v1/orgs/{org}/routines/{routine}/run

API keys: needs the agents:run scope.

Parameter In Type Description
org (required) path string (uuid) The caller’s organisation id.
routine (required) path string (uuid)

Responses

  • 202 Started — open the task — object
  • 401 Missing, invalid or expired token — Problem
  • 403 Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem
  • 404 Not found (also returned for rows the caller may not see, and for disabled features) — Problem

Run history, newest first (each run is a task; skipped = over the event cap)

Section titled “Run history, newest first (each run is a task; skipped = over the event cap)”
GET /v1/orgs/{org}/routines/{routine}/runs

API keys: needs the agents:read scope.

Parameter In Type Description
org (required) path string (uuid) The caller’s organisation id.
routine (required) path string (uuid)
limit query integer Page size.
cursor query string Opaque cursor from a previous page’s next_cursor.

Responses

  • 200 Runs — object
  • 401 Missing, invalid or expired token — Problem
  • 404 Not found (also returned for rows the caller may not see, and for disabled features) — Problem

New webhook secret (the old URL stops working); the URL is shown only now

Section titled “New webhook secret (the old URL stops working); the URL is shown only now”
POST /v1/orgs/{org}/routines/{routine}/webhook-secret

API keys: needs the agents:write scope.

Parameter In Type Description
org (required) path string (uuid) The caller’s organisation id.
routine (required) path string (uuid)

Responses

  • 200 The webhook URL — object
  • 401 Missing, invalid or expired token — Problem
  • 404 Not found (also returned for rows the caller may not see, and for disabled features) — Problem

Run a webhook routine (anything ≤ 64 KB; it reaches the agent as outside content)

Section titled “Run a webhook routine (anything ≤ 64 KB; it reaches the agent as outside content)”
POST /v1/hooks/routines/{routine}/{secret}

Auth: none (public endpoint).

Parameter In Type Description
routine (required) path string (uuid)
secret (required) path string

Responses

  • 202 Accepted (accepted: false when the routine is paused) — object
  • 404 Unknown routine or wrong secret

Run a webhook routine, with the secret in a header (for senders that can set one)

Section titled “Run a webhook routine, with the secret in a header (for senders that can set one)”
POST /v1/hooks/routines/{routine}

Same as the path form; the secret goes in X-Teemli-Webhook-Secret or Authorization: Bearer.

Auth: none (public endpoint).

Parameter In Type Description
routine (required) path string (uuid)
X-Teemli-Webhook-Secret header string

Responses

  • 202 Accepted (accepted: false when the routine is paused) — object
  • 404 Unknown routine or wrong secret

Composio trigger events (Standard Webhooks signature with the project secret)

Section titled “Composio trigger events (Standard Webhooks signature with the project secret)”
POST /v1/hooks/composio

Auth: none (public endpoint).

Responses

  • 202 Accepted
  • 401 Bad signature
  • 404 Not configured (COMPOSIO_WEBHOOK_SECRET unset)