Skip to main content
GET
Poll a composer session
Whether the session is still working, the agent it is currently holding, and the conversation that shaped it. This is what you poll after designing or refining an agent — both of those answer 202 and finish in the background. It is also how you pick up a session your integration started earlier, after a page reload, in another process, or when a human comes back to a preview a day later.

The status code is the answer

The body is the same either way, so a poll loop can branch on the code alone and only parse once it gets a 200.
agent is the current preview — the same body POST /agents accepts verbatim, reflecting every refinement so far.

The three states

The pattern behind that last column: a session never loses an agent it once had. Only the first turn can leave you with no preview, because there was none to fall back on. Everything after that either improves the agent or leaves it exactly as it was. So a processing session that already has an agent is showing you the one your last successful turn produced, and it is still postable while the next change is being applied.

While a turn is in flight

The conversation ends on your own message, with no reply under it yet. That is not a gap in the data — the question has been asked and not yet answered. When the turn lands, the reply appears; when it fails, the question stays standing and error says why, rather than an invented answer appearing beneath it.

Paging the conversation

messages is newest first. When there is an older page, nextCursor is present; pass it back as cursor to continue.
No nextCursor means you have reached the beginning of the conversation.
The cursor is opaque. Do not construct or parse one — pass back what you were given. An unreadable cursor is treated as no cursor, so you get the newest page rather than an error.

Scope and lifetime

Requires the agents read scope. An unknown session, an expired one, and one belonging to another company are all a 404. Sessions live 30 days; expiresAt says when this one goes. Once you create the agent, the conversation moves with it and is no longer read here — it is part of the agent.

Authorizations

Authorization
string
header
required

API key for authentication using Bearer scheme

Path Parameters

sessionId
string<uuid>
required

The composer session id returned by POST /agents/composer.

Query Parameters

cursor
string

Opaque cursor from a previous page's nextCursor.

companyId
string

Required for ATS API keys to specify which company to access. Ignored for standard company API keys.

Response

The turn has finished. status is ready (the preview is in agent) or failed (see error).

sessionId
string<uuid>
required
status
enum<string>
required

processing while a turn is running, ready when agent is a preview you can create from, failed when the last turn did not produce one (see error).

Available options:
processing,
ready,
failed
messages
object[]
required

The conversation so far, newest first.

expiresAt
string<date-time>
required
agent
object

The agent this session would create. Absent only until the FIRST turn produces one; after that it is the last good preview, even while a later turn is running or has failed.

nextCursor
string

Pass as cursor to fetch the next (older) page. Absent at the start of the conversation.

error
object