List schedules across the organization's spaces

Read-only list of the schedules of every space of the organization where the caller holds schedules:read, oldest first. Each row carries its spaceId; map it to a name with GET /api/spaces. The run counters (running_runs, last_run_number, unread_count) follow the row's space: they span every run of the schedule where the caller holds runs:read-all there, the caller's own runs otherwise. A caller who reads schedules in no space gets an empty list. packageId narrows it to one agent's schedules; any other query parameter is rejected with 400. A space the caller holds no role in (a closed space not joined, a private space they are not a member of) contributes nothing, and a credential pinned to a space (a space API key, a space-bound MCP token) reaches that space only. No X-Space-Id: the organization is the path's. An end-user is refused with 403.

GET/api/orgs/{orgId}/schedules

Authorization

better-auth.session_token<token>

Cookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.

In: cookie

Path Parameters

orgId*string

Organization ID.

Query Parameters

packageId?string

Return only the schedules of this agent (@scope/name). A package the caller cannot read yields an empty list, not a refusal. A value that is not a package id is rejected with 400; an empty value reads as absent.

Match^@[a-z0-9]([a-z0-9-]*[a-z0-9])?\/[a-z0-9]([a-z0-9-]*[a-z0-9])?$
curl -X GET "https://your-instance/api/orgs/string/schedules"
{
  "object": "list",
  "data": [
    {
      "id": "string",
      "packageId": "string",
      "userId": "string",
      "endUserId": "string",
      "orgId": "string",
      "spaceId": "string",
      "name": "string",
      "enabled": true,
      "disabled_reason": "actor_invalid",
      "cron_expression": "string",
      "timezone": "string",
      "input": {},
      "generation_config_override": {
        "temperature": 0,
        "reasoning_level": "off"
      },
      "model_id_override": "string",
      "proxy_id_override": "string",
      "version_override": "string",
      "connection_overrides": {
        "property1": [],
        "property2": []
      },
      "dependency_overrides": {
        "property1": "string",
        "property2": "string"
      },
      "last_run_at": "2019-08-24T14:15:22Z",
      "next_run_at": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "agent_name": "string",
      "actor_name": "string",
      "actor_type": "user",
      "running_runs": 0,
      "unread_count": 0,
      "last_run_number": 0
    }
  ],
  "hasMore": true
}

{
  "type": "https://docs.appstrate.dev/errors/validation-failed",
  "title": "Validation Failed",
  "status": 400,
  "detail": "name: Invalid input: expected string, received undefined (+2 more)",
  "code": "validation_failed",
  "request_id": "req_abc123",
  "errors": [
    {
      "field": "name",
      "code": "required",
      "message": "Invalid input: expected string, received undefined"
    },
    {
      "field": "email",
      "code": "invalid_format",
      "message": "Invalid email address"
    },
    {
      "field": "age",
      "code": "invalid_type",
      "message": "Invalid input: expected number, received string"
    }
  ]
}

{
  "type": "https://docs.appstrate.dev/errors/unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Invalid or missing session",
  "code": "unauthorized",
  "request_id": "req_abc123"
}
{
  "type": "https://docs.appstrate.dev/errors/forbidden",
  "title": "Forbidden",
  "status": 403,
  "detail": "Insufficient permissions",
  "code": "forbidden",
  "request_id": "req_abc123"
}