v1

latestOpenAPI 3.0.02026-08-04891301.4 MB

List schedules for an agent

Returns all schedules belonging to the specified agent in any status. Use the status parameter to narrow results to a single lifecycle state.

Requires an app-scoped API key. The agent must belong to the app identified by the key.

get/api/v1/agents/{agent}/schedules

Path parameters

agentstring required

Agent ID (agi_...). The agent whose schedules you want to retrieve.

Query parameters

statusstring

Filter results by schedule status. One of "active", "paused", "completed", "cancelled", or "expired". Omit to return schedules in all statuses.

Response

Successful response

Example response

{
  "data": [
    {
      "agent": "agi_0aBcDeFgHiJkLmNoPqRsTu",
      "app": "dap_0aBcDeFgHiJkLmNoPqRsTu",
      "created_at": "2024-01-01T00:00:00Z",
      "cron_expression": "0 9 * * 1",
      "id": "asc_0aBcDeFgHiJkLmNoPqRsTu",
      "instructions": "Send a daily summary of open support tickets to the team Slack channel.",
      "last_run_at": "2024-01-01T00:00:00Z",
      "max_runs": 10,
      "metadata": {
        "key": "value"
      },
      "next_run_at": "2024-01-01T00:00:00Z",
      "run_count": 1,
      "schedule_type": "recurring",
      "scheduled_at": "2024-01-01T00:00:00Z",
      "status": "active",
      "thread": "thr_0aBcDeFgHiJkLmNoPqRsTu",
      "timezone": "America/New_York",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ]
}