Get a chat session with its messages
GET
/api/orgs/{orgId}/chat/sessions/{id}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.
id*string
curl -X GET "https://your-instance/api/orgs/string/chat/sessions/string"{
"object": "chat_session",
"id": "string",
"title": "string",
"generating": true,
"unread": true,
"skill_discovery": true,
"pins": [
{
"id": "string",
"status": "injected",
"chars": 0
}
],
"spaceId": "string",
"restricted": true,
"space_ids": [
"string"
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"messages": [
{
"id": "string",
"content": null
}
],
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"tiers": [
{
"input_tokens_above": 1,
"input_tokens": 0,
"output_tokens": 0,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
]
}
}{
"type": "https://docs.appstrate.dev/errors/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Insufficient permissions",
"code": "forbidden",
"request_id": "req_abc123"
}{
"type": "https://docs.appstrate.dev/errors/not-found",
"title": "Not Found",
"status": 404,
"detail": "Resource not found",
"code": "not_found",
"request_id": "req_abc123"
}