Skip to main content
GET
/
v1
/
sessions
/
{session_id}
/
messages
curl https://api.dari.dev/v1/sessions/sess_123/messages \
  -H "Authorization: Bearer $DARI_API_KEY"
{
  "messages": [
    {
      "id": "msg_123",
      "session_id": "sess_123",
      "sequence_number": 1,
      "parts": [
        { "type": "text", "text": "List the top-level files in the repo." }
      ],
      "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 durable message read models for a session in sequence order. Each message is one user turn with its assistant response embedded in output. The payload is self-sufficient for rendering a transcript — output.parts contains the assistant turn with text, tool calls, and tool results interleaved in order — so callers do not need to walk GET /v1/sessions/{session_id}/events to reconstruct what the agent did.

Path Parameters

session_id
string
required
Session ID.

Headers

Authorization
string
required
Bearer token using your Dari API key.

Response Fields

messages
array
Messages in sequence order. Each element has the same shape as Get Message.
curl https://api.dari.dev/v1/sessions/sess_123/messages \
  -H "Authorization: Bearer $DARI_API_KEY"
{
  "messages": [
    {
      "id": "msg_123",
      "session_id": "sess_123",
      "sequence_number": 1,
      "parts": [
        { "type": "text", "text": "List the top-level files in the repo." }
      ],
      "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"
    }
  ]
}