List chat sessions
List the caller's chat sessions in the current space, most recent activity (updatedAt) first. Keyset-paginated: when hasMore is true, pass the last session's id as ?startingAfter=, or follow the RFC 5988 Link: <…>; rel="next" response header. A session whose activity moves it to the head while you page is not repeated later in that walk; re-read the first page to see it.
/api/chat/sessionsCookie session from Better Auth. Requires X-Org-Id header for org-scoped routes.
In: cookie
Query Parameters
Page size. Out-of-range or non-numeric values fall back to 100.
1001 <= value <= 100Keyset cursor — the id of the last session of the previous page. An id that is not one of the caller's sessions in this space is a 400.
Header Parameters
Organization ID. Required for cookie auth. Not needed for API key auth (org resolved from key).
uuidSpace ID. Required for space-scoped routes (agents, runs, schedules, and space-scoped module routes). Not needed for API key auth (space resolved from key).
curl -X GET "https://your-instance/api/chat/sessions"{
"object": "list",
"data": [
{
"object": "chat_session",
"id": "string",
"title": "string",
"generating": true,
"unread": true,
"skill_mode": "auto",
"pinned_skills": [
"string"
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
],
"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/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Insufficient permissions",
"code": "forbidden",
"request_id": "req_abc123"
}