Skip to content
Docs
GitHub

List messages (PRIMARY data)

Preview

Manage execution sessions and rooms, and their files, tasks, storage, databases and managed sandboxes.

Public APIEverruns Cloud and self-hosted Platform

GET/v1/sessions/{session_id}/messages

See authentication for credentials and permissions.

session_id
required
string

Session ID (prefixed, e.g., sess_…)

Responses

200List of messages

List of messages

Media typeapplication/json

Response wrapper for list endpoints. All list endpoints return responses wrapped in a data field.

object
data
required

Array of items returned by the list operation.

Array<object>

Message - primary conversation data (API response)

object
content
required

Array of content parts.

Reasoning artifacts appear here as reasoning parts, in the order the provider emitted them, with opaque replay state (signatures, encrypted payloads) stripped.

Array
One of:

Text content

object
annotations

Claim-level citations attached to spans of text.

The narrow render contract shared by all citation capabilities. Empty for non-cited text, so the wire shape of existing messages is unchanged.

Array<object>

A claim-level citation attached to a span of generated text.

The single shared type across every citation capability: a text span linked to a source. Producers agree only on this render contract — each capability keeps its own richer representation (e.g. KnowledgeIndexCitation) and maps into this envelope at emit time.

object
end
required

Exclusive end char offset.

integer
external_id

Opaque producer id (e.g. kchk_…, kbe_…, a URL hash). Not interpreted by the render contract.

string | null
origin
required

Capability id that produced this annotation (e.g. citation_retrieval). Lets the UI and evals attribute and filter each citation by feed.

string
source
required

The cited source.

object
location

Provenance within the document (line / char / page / block ranges), reusing the retrieval location JSONB shape.

snippet

Trimmed passage that backs the claim. Display-only; never relied on for prompt reconstruction.

string | null
title

Human-readable source title, when known.

string | null
uri
required

Stable, linkable locator (e.g. github://owner/repo@main/docs/x.md or an https:// URL).

string
start
required

0-indexed start char offset into the enclosing TextContentPart.text.

integer
verified
One of:

Verification verdict, filled by the citation_verification capability. Absent means unverified (not “unsupported”).

object
score

Entailment confidence in [0, 1], when the verifier produced one.

number | null format: float
status
required

Whether the cited source supports the claim.

string
Allowed values: entailed unsupported uncertain
text
required
string
type
required
string
Allowed values: text
controls
One of:

Runtime controls (model, reasoning, etc.)

object
error_disclosure

Error disclosure override for this turn: “generic”, “standard”, or “detailed”. Clamped to at most the mode allowed by the agent’s error_disclosure capability (capability absent => “standard”), so a client can narrow but never widen disclosure.

string | null
hints

Generic client hints — arbitrary key-value pairs declared by the client. Session-level defaults are set at session creation; per-message values override session hints key-by-key (shallow merge).

Examples: {"setup_connection": true, "rich_media": true}

object | null
locale

Locale override for this message turn (BCP 47, e.g. uk-UA). Overrides the session locale for backend-authored strings and prompts.

string | null
model_id

Model ID to use for this message (format: model_{32-hex}). Overrides session and agent model settings.

string | null
reasoning
One of:

Reasoning configuration

object
effort
One of:

Effort level for reasoning.

Typed rather than free-form: the effort taxonomy is closed, and each driver previously re-parsed the string with its own case handling, which let minimal silently mean “no reasoning” on budget-based models.

string
Allowed values: none minimal low medium high xhigh max
speed

Speed (service tier) for this message turn: “flex”, “default”, “priority”, “fast” (OpenAI’s newer name for priority) or “ultrafast”. Only sent when the model’s profile lists the tier (OpenAI service_tier); otherwise the runtime drops it.

string | null
verbosity

Verbosity for this message turn: “low”, “medium”, or “high”. Only sent to providers whose model profile advertises a verbosity config (OpenAI verbosity).

string | null
created_at
required

Timestamp when this resource was created (RFC 3339).

string format: date-time
delivery
One of:

How a message just created was delivered. Only set on the response to creating a message; absent when listing.

string
Allowed values: started steered resumed duplicate
external_actor
One of:

External actor identity (for messages from external channels like Slack)

object
actor_id
required

Opaque actor identifier from the source channel (e.g. Slack user ID “U0123456789”)

string
actor_name

Resolved display name (e.g. “Alice”). Falls back to actor_id if absent.

string | null
metadata

Channel-specific metadata (e.g. team_id, channel_id)

object | null
source
required

Source channel identifier (e.g. “slack”, “discord”)

string
id
required

Unique message ID (format: message_{32-hex})

string
metadata

Message-level metadata (locale, etc.)

object | null
phase
One of:

Execution phase for agent messages: whether this is intermediate commentary or the turn’s final_answer. Absent on user messages.

Without this a client cannot tell an intermediate message from the answer, which is the single question most consumers of a session need answered.

string
Allowed values: commentary final_answer
phase_source
One of:

Whether phase was reported by the provider or inferred by the runtime from tool-call presence.

derived is a weak signal: it means only “this message called tools”, so a text-only preamble is reported as final_answer. Clients needing a dependable classification should treat derived accordingly.

string
Allowed values: provider derived communication
role
required

Message role (API layer)

Simplified to only user and agent messages. Tool results are conveyed via tool.completed events. System messages are internal and not exposed via API.

string
Allowed values: user agent
sequence
required
integer format: int32
session_id
required

Session ID this message belongs to (format: session_{32-hex})

string

Example

{
"data": [
{
"content": [
{
"annotations": [
{
"end": 19,
"external_id": "kchk_01j9y3q8w2",
"origin": "citation_retrieval",
"source": {
"snippet": "The control plane owns durable state.",
"title": "Architecture Overview",
"uri": "github://owner/repo@main/docs/x.md"
},
"start": 0,
"verified": {
"score": 0.92,
"status": "entailed"
}
}
],
"type": "text"
}
],
"controls": {
"model_id": "model_01933b5a00007000800000000000001",
"reasoning": {
"effort": "none"
}
},
"delivery": "started",
"id": "message_01933b5a00007000800000000000001",
"phase": "commentary",
"phase_source": "provider",
"role": "user",
"session_id": "session_01933b5a00007000800000000000001"
}
]
}
400Invalid ID format

Invalid ID format

404Session not found

Session not found

500Internal server error

Internal server error