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": "example" }, "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 specs/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 specs/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: system user agent tool_result
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

A message in the conversation

object
content
required

Message content as array of content parts (text, images, tool calls, tool results)

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 specs/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 specs/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 the message was created

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

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

string
metadata

Message-level metadata

object | null
phase
One of:
null
role
required

Message role

string
Allowed values: system user agent tool_result
thinking

Thinking content from extended thinking models (Anthropic Claude) This is the model’s chain-of-thought reasoning before producing the response. Must be included in subsequent API calls when thinking is enabled.

string | null
thinking_signature

Cryptographic signature for thinking content (Anthropic Claude) Required when sending thinking back in subsequent API calls.

string | null
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"
},
"id": "message_01933b5a00007000800000000000001",
"phase": "Commentary",
"role": "system"
}

Invalid ID format

Session not found

Internal server error