Skip to main content
GET
/
v1
/
messages
/
{message_id}
curl https://api.dari.dev/v1/messages/msg_123 \
  -H "Authorization: Bearer $DARI_API_KEY"
{
  "id": "msg_123",
  "session_id": "sess_123",
  "sequence_number": 4,
  "parts": [
    { "type": "text", "text": "List the top-level files in the repo." }
  ],
  "metadata": null,
  "status": "completed",
  "attempt": 1,
  "output": {
    "parts": [
      { "type": "text", "text": "I'll list the workspace root." },
      {
        "type": "tool_call",
        "id": "call_01",
        "name": "bash",
        "arguments": { "command": "ls -1" }
      },
      {
        "type": "tool_result",
        "tool_call_id": "call_01",
        "tool_name": "bash",
        "content": [
          { "type": "text", "text": "README.md\npackage.json\nsrc\n" }
        ],
        "is_error": false
      },
      { "type": "text", "text": "The top-level entries are README.md, package.json, and src/." }
    ]
  },
  "created_at": "2026-04-21T18:40:00Z",
  "completed_at": "2026-04-21T18:40:12Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.dari.dev/llms.txt

Use this file to discover all available pages before exploring further.

Returns the current message record, including status, attempts, and terminal output when available. This is the canonical polling resource for async message execution. The response is self-sufficient for rendering a transcript: output.parts contains the assistant turn with text, tool calls, and tool results interleaved in order, and output.error surfaces the real upstream failure when a message fails.

Path Parameters

message_id
string
required
Message ID.

Headers

Authorization
string
required
Bearer token using your Dari API key.

Response Fields

id
string
Message ID.
session_id
string
Session ID.
sequence_number
integer
Monotonic position of the message within its session.
parts
array
The user-supplied parts that opened this turn (the original content from POST /v1/sessions/{session_id}/events).
metadata
object
Optional user-supplied metadata passed with the originating event.
status
string
Current message status: queued, running, waiting_for_tool, completed, or failed.
attempt
integer
Current attempt count.
output
object
Structured output when available. Null while the message is still running.
created_at
string
ISO 8601 creation timestamp.
completed_at
string
ISO 8601 completion timestamp. Null until the message reaches a terminal state.
curl https://api.dari.dev/v1/messages/msg_123 \
  -H "Authorization: Bearer $DARI_API_KEY"
{
  "id": "msg_123",
  "session_id": "sess_123",
  "sequence_number": 4,
  "parts": [
    { "type": "text", "text": "List the top-level files in the repo." }
  ],
  "metadata": null,
  "status": "completed",
  "attempt": 1,
  "output": {
    "parts": [
      { "type": "text", "text": "I'll list the workspace root." },
      {
        "type": "tool_call",
        "id": "call_01",
        "name": "bash",
        "arguments": { "command": "ls -1" }
      },
      {
        "type": "tool_result",
        "tool_call_id": "call_01",
        "tool_name": "bash",
        "content": [
          { "type": "text", "text": "README.md\npackage.json\nsrc\n" }
        ],
        "is_error": false
      },
      { "type": "text", "text": "The top-level entries are README.md, package.json, and src/." }
    ]
  },
  "created_at": "2026-04-21T18:40:00Z",
  "completed_at": "2026-04-21T18:40:12Z"
}