Skip to content

List the user's chat sessions

GET
/api/v1/chat/sessions
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).

kind
string

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

Session summaries

Media type*/*
Array<object>

One of the caller’s persisted chat sessions, metadata only; listed by GET /chat/sessions

object
createdAt
required

When the session was created, as an ISO-8601 instant

string
heldWith

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

string
kind
required

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

string
Allowed values: CHAT THREAD AGENT CHANNEL
lastActivityAt
required

When the session last had activity, as an ISO-8601 instant; the list is sorted on it, newest first

string
sessionId
required

Session id; pass it as sessionId to GET /chat/stream to open the session, or to DELETE /chat/sessions/{sessionId}

string
startedBy

Who wrote the session’s first message: the user, an agent, or the appliance; null while nobody has written in it

object
kind
required

PERSON for the thread’s owner, AGENT for an agent, APPLIANCE for the appliance’s own notices

string
Allowed values: PERSON AGENT APPLIANCE
name
required

The person’s username, the agent’s name, or appliance

string
title

The session’s title; null while it has none

string

No such kind of session