Skip to main content
GET
/
v1
/
sessions
/
{session_id}
/
transcript
curl https://api.dari.dev/v1/sessions/sess_123/transcript \
  -H "Authorization: Bearer $DARI_API_KEY"
{
  "agent": {
    "id": "agt_123",
    "name": "support-agent",
    "active_version_id": "ver_123",
    "created_at": "2026-03-31T18:30:00Z",
    "deleted_at": null
  },
  "session": {
    "id": "sess_123",
    "agent_id": "agt_123",
    "version_id": "ver_123",
    "storage_binding_id": null,
    "status": "idle",
    "last_message_id": "msg_123",
    "last_message_status": "completed",
    "created_at": "2026-03-31T18:39:00Z"
  },
  "timeline": {
    "items": [
      {
        "type": "user_message",
        "id": "sess_123:evt_1",
        "message_id": "msg_123",
        "content": [
          { "type": "text", "text": "Summarize this ticket and draft a reply." }
        ],
        "created_at": "2026-03-31T18:40:00Z"
      },
      {
        "type": "tool_call",
        "id": "sess_123:evt_4",
        "message_id": "msg_123",
        "tool_call_id": "call_abc",
        "tool_name": "lookup_ticket",
        "arguments": { "ticket_id": "T-1042" },
        "status": "completed",
        "result": { "priority": "high", "customer_tier": "enterprise" },
        "is_error": false,
        "created_at": "2026-03-31T18:40:04Z",
        "completed_at": "2026-03-31T18:40:06Z"
      },
      {
        "type": "assistant_message",
        "id": "sess_123:evt_7",
        "message_id": "msg_123",
        "status": "completed",
        "content": [
          { "type": "text", "text": "This is a high-priority enterprise ticket. Here is a draft reply..." }
        ],
        "created_at": "2026-03-31T18:40:09Z",
        "error_message": null
      }
    ]
  }
}

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 a snapshot of a session as a renderable timeline. Use this endpoint when you want to show the full conversation without reconstructing user messages, assistant messages, and tool calls from the raw event ledger.
curl https://api.dari.dev/v1/sessions/sess_123/transcript \
  -H "Authorization: Bearer $DARI_API_KEY"
For live updates, stream GET /v1/sessions/{session_id}/stream and refetch the transcript after new events arrive.

Path Parameters

session_id
string
required
Session ID.

Headers

Authorization
string
required
Bearer token using your Dari API key.

Response Fields

agent
object
The agent that owns the session.
session
object
The current session record, including lifecycle status and most recent message references.
timeline.items
array
Renderable transcript items in display order. Each item has a type field that determines its shape.
timeline.items[].type
string
One of user_message, assistant_message, or tool_call.
timeline.items[].message_id
string
Message ID for the user turn this timeline item belongs to.
timeline.items[].created_at
string
ISO 8601 timestamp for when this timeline item was created.

User message items

timeline.items[].content
array
For user_message items, this is the ordered user-supplied content, such as text, file, or image blocks.

Assistant message items

timeline.items[].status
string
For assistant_message items, the current message status: queued, running, waiting_for_tool, completed, or failed.
timeline.items[].content
array
For assistant_message items, this is the assistant response content available so far. It is empty while the message is still queued or running.
timeline.items[].error_message
string
For failed assistant messages, the error message if one is available.

Tool call items

timeline.items[].tool_call_id
string
For tool_call items, the tool call ID.
timeline.items[].tool_name
string
For tool_call items, the tool name.
timeline.items[].arguments
object
For tool_call items, the arguments sent to the tool.
timeline.items[].status
string
For tool_call items, the current tool status: requested, running, completed, or failed.
timeline.items[].result
object
For completed or failed tool_call items, the tool result or error payload when available.
timeline.items[].is_error
boolean
For tool_call items, whether the result represents an error.
timeline.items[].completed_at
string
For completed or failed tool_call items, the ISO 8601 completion timestamp when available.
{
  "agent": {
    "id": "agt_123",
    "name": "support-agent",
    "active_version_id": "ver_123",
    "created_at": "2026-03-31T18:30:00Z",
    "deleted_at": null
  },
  "session": {
    "id": "sess_123",
    "agent_id": "agt_123",
    "version_id": "ver_123",
    "storage_binding_id": null,
    "status": "idle",
    "last_message_id": "msg_123",
    "last_message_status": "completed",
    "created_at": "2026-03-31T18:39:00Z"
  },
  "timeline": {
    "items": [
      {
        "type": "user_message",
        "id": "sess_123:evt_1",
        "message_id": "msg_123",
        "content": [
          { "type": "text", "text": "Summarize this ticket and draft a reply." }
        ],
        "created_at": "2026-03-31T18:40:00Z"
      },
      {
        "type": "tool_call",
        "id": "sess_123:evt_4",
        "message_id": "msg_123",
        "tool_call_id": "call_abc",
        "tool_name": "lookup_ticket",
        "arguments": { "ticket_id": "T-1042" },
        "status": "completed",
        "result": { "priority": "high", "customer_tier": "enterprise" },
        "is_error": false,
        "created_at": "2026-03-31T18:40:04Z",
        "completed_at": "2026-03-31T18:40:06Z"
      },
      {
        "type": "assistant_message",
        "id": "sess_123:evt_7",
        "message_id": "msg_123",
        "status": "completed",
        "content": [
          { "type": "text", "text": "This is a high-priority enterprise ticket. Here is a draft reply..." }
        ],
        "created_at": "2026-03-31T18:40:09Z",
        "error_message": null
      }
    ]
  }
}

Errors

A missing or invalid API key returns 401. If the session does not exist, the API returns 404. If the API key belongs to a different organization than the session, the API returns 403.