Skip to content

Create message (user message triggers workflow)

POST
/v1/sessions/{session_id}/messages
curl --request POST \
--url https://app.everruns.com/api/v1/sessions/example/messages \
--header 'Content-Type: application/json' \
--data '{ "addressed_participant_id": "part_01933b5a00007000800000000000001", "controls": { "error_disclosure": "example", "hints": "example", "locale": "example", "model_id": "model_01933b5a00007000800000000000001", "reasoning": { "effort": "none" }, "speed": "example", "verbosity": "example" }, "external_actor": { "actor_id": "example", "actor_name": "example", "metadata": "example", "source": "example" }, "message": { "content": [ { "text": "Why is the build failing on main?", "type": "text" } ], "role": "user" }, "metadata": { "source": "slack", "thread_ts": "1715000000.123456" }, "tags": [ "bug-report", "from-slack" ] }'
session_id
required
string

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

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
controls
One of:
null
external_actor
One of:
null
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 (see knowledge/runtime-resources/citations.md). 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. See knowledge/runtime-resources/citations.md.

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:
null
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"
]

Message created successfully

Media typeapplication/json

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 (see knowledge/runtime-resources/citations.md). 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. See knowledge/runtime-resources/citations.md.

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:
null
text
required
string
type
required
string
Allowed values: text
controls
One of:
null
created_at
required

Timestamp when this resource was created (RFC 3339).

string format: date-time
external_actor
One of:
null
id
required

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

string
metadata

Message-level metadata (locale, etc.)

object | null
phase
One of:
null
phase_source
One of:
null
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"
}
},
"id": "message_01933b5a00007000800000000000001",
"phase": "commentary",
"phase_source": "provider",
"role": "user",
"session_id": "session_01933b5a00007000800000000000001"
}

Invalid ID format

Session not found

Internal server error