SessionsList sessions

List sessions

List sessions, filterable by role and status.

curl -X GET "https://api.autopil.ai/v1/sessions?agent_role=example_string&status=active" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
[
  {
    "session_id": "example_string",
    "agent_role": "example_string",
    "status": "active",
    "created_at": "2024-12-25T10:00:00Z",
    "expires_at": "2024-12-25T10:00:00Z"
  }
]
GET
/v1/sessions
GET
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key with admin, read, or evaluate scope. Missing key → 401; invalid or revoked key → 403.

API key with admin, read, or evaluate scope. Missing key → 401; invalid or revoked key → 403.
query
statusstring
Options: active, expired, revoked
Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. API key with admin, read, or evaluate scope. Missing key → 401; invalid or revoked key → 403.

Query Parameters

statusstring
Allowed values:activeexpiredrevoked

Responses

session_idstring
agent_rolestring
statusstring
Allowed values:activeexpiredrevoked
created_atstring
expires_atstring