List the user's chat sessions
const url = 'http://localhost:11044/api/v1/chat/sessions';const options = {method: 'GET', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:11044/api/v1/chat/sessions \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Returns the authenticated user’s persisted sessions, chats and threads alike, most recently active first, capped at 50 entries. An agent’s own sessions, held through an OpenAI, A2A or MCP client, are listed only when asked for with kind=agent, and a Telegram, Slack or Discord chat only with kind=channel; kind names one kind of session to list. Each says its kind — a thread is posted in through /threads — who started it, when anyone has written in it yet, and the agent it is held with, if any. Metadata only (no message bodies).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”One kind of session to list, case-insensitive: thread, agent, channel, or the stored name of the plain chat kind. Omitted, chats and threads are listed and agent and channel sessions are left out; an unrecognised kind is refused with 400
Responses
Section titled “Responses”Session summaries
One of the caller’s persisted chat sessions, metadata only; listed by GET /chat/sessions
object
When the session was created, as an ISO-8601 instant
Username of the agent an agent’s own session is held with; null for any other session, and for an OpenAI client’s talk with the world itself
How the session is talked to: CHAT through the chat stream, THREAD through /threads, AGENT by the client holding an agent’s session, CHANNEL through Telegram, Slack or Discord
When the session last had activity, as an ISO-8601 instant; the list is sorted on it, newest first
Session id; pass it as sessionId to GET /chat/stream to open the session, or to DELETE /chat/sessions/{sessionId}
Who wrote the session’s first message: the user, an agent, or the appliance; null while nobody has written in it
object
PERSON for the thread’s owner, AGENT for an agent, APPLIANCE for the appliance’s own notices
The person’s username, the agent’s name, or appliance
The session’s title; null while it has none
No such kind of session

