Skip to main content
GET /api/v1/cloud/sessions Retrieves Sessions under the current account. Archived Sessions are excluded by default.

Headers

HeaderRequiredDescription
AuthorizationYesBearer $QODER_PAT

Query parameters

ParameterTypeRequiredDescription
limitintegerNoMaximum number of records to return. Default 20, range 1-100. Values above 100 return 400 invalid_request_error.
pagestringNoOpaque cursor from a previous response’s next_page
orderstringNoSort direction: desc (default) or asc
include_archivedbooleanNoSet to true to include archived Sessions
statusesstring or arrayNoFilter by Session lifecycle status. Allowed values: running, idle, rescheduling, terminated. Archived Sessions are filtered separately via include_archived
agent_idstringNoFilter by Agent ID
agent_versionintegerNoFilter by Agent version
deployment_idstringNoFilter by Deployment ID
memory_store_idstringNoFilter Sessions that have a Memory Store resource
created_at[gt]stringNoReturn Sessions created after this RFC 3339 timestamp
created_at[gte]stringNoReturn Sessions created at or after this RFC 3339 timestamp
created_at[lt]stringNoReturn Sessions created before this RFC 3339 timestamp
created_at[lte]stringNoReturn Sessions created at or before this RFC 3339 timestamp

Example request

curl -X GET "https://api.qoder.com/api/v1/cloud/sessions?limit=3&include_archived=true" \
  -H "Authorization: Bearer $QODER_PAT"

Example response

HTTP 200 OK
{
  "data": [
    {
      "id": "sess_019e3bb1e8c171fd9abbb1477ffb84cc",
      "type": "session",
      "agent": {
        "id": "agent_019e390add9f7bac9b6cc806db46fcbd",
        "type": "agent",
        "version": 2,
        "name": "doc-verification-agent",
        "description": "",
        "model": {"id": "ultimate", "effective_context_window": 200000},
        "system": "You are an expert software engineer.",
        "tools": [{"enabled_tools": ["Bash", "Read", "Write", "Edit", "Glob", "Grep"], "type": "agent_toolset_20260401"}],
        "skills": [],
        "mcp_servers": []
      },
      "environment_id": "env_019e2590d33f711fabf42f2857cecd8a",
      "title": "API-doc-verification-session",
      "status": "idle",
      "metadata": {},
      "resources": [],
      "vault_ids": [],
      "deployment_id": null,
      "outcome_evaluations": [],
      "stats": {"active_seconds": 0, "duration_seconds": 0},
      "environment_variables": {},
      "archived_at": null,
      "created_at": "2026-05-18T15:26:15.747298Z",
      "updated_at": "2026-05-18T15:26:15.747298Z"
    }
  ],
  "first_id": "sess_019e3bb1e8c171fd9abbb1477ffb84cc",
  "has_more": false,
  "last_id": "sess_019e3bb1e8c171fd9abbb1477ffb84cc",
  "next_page": null
}

Response fields

FieldTypeDescription
dataarrayArray of Session objects
has_morebooleantrue when additional pages exist beyond the current result set
first_idstringID of the first Session in the current page
last_idstringID of the last Session in the current page
next_pagestring | nullOpaque cursor for the next page, or null when there are no more results

Errors

HTTPTypeTrigger
400invalid_request_errorInvalid pagination or filter parameter
401authentication_errorPAT invalid or expired
HTTP 400 Bad Request
{
  "type": "error",
  "request_id": "cb80235f-76a2-4ff3-9e28-5aa2da12dc14",
  "error": {
    "type": "invalid_request_error",
    "message": "Field 'limit' must be a positive integer."
  }
}
See Errors for the full error envelope.

Start a session

Run an agent against an environment as a stateful conversation.