Skip to content
Docs
GitHub

Create message (user message triggers workflow)

Preview

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

Public APIEverruns Cloud and self-hosted Platform

POST/v1/sessions/{session_id}/messages

See authentication for credentials and permissions.

session_id
required
string

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

wait
boolean

Wait for turn completion and return the turn result.

timeout_ms
integer | null format: int64

Max wait budget in milliseconds (default 120000, capped at 600000). Only used with wait=true. On expiry the endpoint returns 202 with the messages produced so far.

Media typeapplication/json

Request to create a message

object
addressed_participant_id

Optional active agent participant to address for this turn. When omitted, the session host remains the responder.

string | null

Example

part_01933b5a00007000800000000000001
client_message_id

Client-minted id for this send (a UUID). A repeat of the same id in the same session returns the stored message instead of starting another turn, so a client can retry a send whose response it never saw. The stored message echoes it as everruns_client_message_id metadata.

string | null

Example

0199d0f2-6c1e-7a3b-9f00-1a2b3c4d5e6f
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

Example

model_01933b5a00007000800000000000001
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
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
message
required

The message to create. Example shape is defined on InputMessage.

object
content
required

Array of content parts (text and image only)

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

Example

19
external_id

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

string | null

Example

kchk_01j9y3q8w2
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

Example

citation_retrieval
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

Example

The control plane owns durable state.
title

Human-readable source title, when known.

string | null

Example

Architecture Overview
uri
required

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

string

Example

github://owner/repo@main/docs/x.md
start
required

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

integer

Example

0
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

Example

0.92
status
required

Whether the cited source supports the claim.

string
Allowed values: entailed unsupported uncertain

Example

entailed
text
required
string
type
required
string
Allowed values: text
role

Message role (always “user” for API-created messages)

string
Allowed values: user agent

Example

{
"content": [
{
"text": "Why is the build failing on main?",
"type": "text"
}
],
"role": "user"
}
metadata

Request-level metadata. Arbitrary key/value pairs persisted with the message for downstream filtering and analytics. Not interpreted by the agent.

object | null

Example

{
"source": "slack",
"thread_ts": "1715000000.123456"
}
tags

Tags for the message. Free-form labels used for grouping and filtering.

Array<string> | null

Example

[
"bug-report",
"from-slack"
]

Responses

200Waited turn reached a terminal state (?wait=true)

Waited turn reached a terminal state (?wait=true)

Media typeapplication/json
One of:

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

{
"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"
}
201Message accepted; turn runs in background

Message accepted; turn runs in background

Media typeapplication/json
One of:

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

{
"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"
}
202Wait deadline expired; turn still running (?wait=true)

Wait deadline expired; turn still running (?wait=true)

Media typeapplication/json
One of:

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

{
"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

429Long-lived response concurrency limit reached

Long-lived response concurrency limit reached

500Internal server error

Internal server error