Menu

Agent routines

3 endpoints in the Mattering Automations API. Service tier only.

POST agents/routines/create/ Service tier

POST /api/internal/agents/routines/create/: create a scheduled routine.

Body: {
    agent_id: str,
    name: str,
    cron_expression: str,
    timezone: str,          # default "UTC"
    space_id: str,
    context_template: dict, # injected into agent at fire time
    max_invocations: int?,
    start_at: str?,         # ISO datetime
    end_at: str?,           # ISO datetime
}

URL

  • Service tierhttps://automations.mattering.io/api/internal/agents/routines/create/

Body keys (JSON)

KeyRequiredDefault
configoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

201 bare JSON object (no envelope)

{
  "id": "...",
  "agent_id": "...",
  "agent_name": "...",
  "name": "...",
  "cron_expression": "...",
  "timezone": "...",
  "status": "...",
  "next_fire_at": "2026-01-01T00:00:00Z",
  "created": true
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
400agent_id is required message
400cron_expression is required message

Example

curl -X POST "https://automations.mattering.io/api/internal/agents/routines/create/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "config": "..."
}'

Source: AutomationsCore/agent_bridge_views.py (agent_bridge_views.create_agent_routine)

GET agents/routines/list/ Service tier

GET /api/internal/agents/routines/list/: list routines for an org.

URL

  • Service tierhttps://automations.mattering.io/api/internal/agents/routines/list/

Query parameters

NameDefault
space_idnone

Responses

200 bare JSON object (no envelope)

{
  "routines": [
    {
      "id": "...",
      "agent_id": "...",
      "agent_name": "...",
      "name": "...",
      "cron_expression": "...",
      "timezone": "...",
      "status": "...",
      "next_fire_at": "2026-01-01T00:00:00Z",
      "last_fire_at": "2026-01-01T00:00:00Z",
      "total_invocations": 0,
      "consecutive_errors": "...",
      "last_execution_status": "...",
      "created_at": "2026-01-01T00:00:00Z"
    }
  ]
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
400Missing org context message

Example

curl -X GET "https://automations.mattering.io/api/internal/agents/routines/list/?space_id=..." \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com"

Source: AutomationsCore/agent_bridge_views.py (agent_bridge_views.list_agent_routines)

POST agents/routines/update/ Service tier

POST /api/internal/agents/routines/update/: update or pause a routine.

Body: {schedule_id, status?, name?, cron_expression?, context_template?}

URL

  • Service tierhttps://automations.mattering.io/api/internal/agents/routines/update/

Body keys (JSON)

KeyRequiredDefault
configoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 bare JSON object (no envelope)

{
  "id": "...",
  "status": "...",
  "timezone": "...",
  "next_fire_at": "2026-01-01T00:00:00Z",
  "updated": true
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
400schedule_id is required message
404Routine not found message

Example

curl -X POST "https://automations.mattering.io/api/internal/agents/routines/update/" \
  -H "X-Internal-Secret: $MATTERING_INTERNAL_API_SECRET" \
  -H "X-Internal-Org-Id: $ORG_ID" \
  -H "X-Internal-User-Email: you@example.com" \
  -H "Content-Type: application/json" \
  -d '{
  "config": "..."
}'

Source: AutomationsCore/agent_bridge_views.py (agent_bridge_views.update_agent_routine)

All Automations resources
Start Free Explore our Products