Skip to main content
GET
/
v1
/
agents
/
sessions
/
{session_id}
/
history
Get History
curl --request GET \
  --url https://api.mixpeek.com/v1/agents/sessions/{session_id}/history
{
  "session_id": "<string>",
  "messages": [
    {
      "message_id": "<string>",
      "role": "<string>",
      "content": "<string>",
      "content_type": "<string>",
      "timestamp": "2023-11-07T05:31:56Z",
      "tool_name": "<string>",
      "tool_inputs": "<string>",
      "tool_outputs": "<string>",
      "tool_status": "<string>"
    }
  ],
  "total_messages": 123,
  "returned_messages": 123,
  "has_more": true
}

Headers

Authorization
string

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

X-Namespace
string

REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'

Path Parameters

session_id
string
required

Session ID

Query Parameters

limit
integer
default:50

Maximum messages to return

Required range: 1 <= x <= 200
offset
integer
default:0

Pagination offset

Required range: x >= 0

Response

Successful Response

Response for retrieving conversation history.

Attributes: session_id: Session identifier messages: List of messages in chronological order total_messages: Total number of messages in session returned_messages: Number of messages returned (may be limited) has_more: Whether there are more messages available

Example: python response = GetHistoryResponse( session_id="ses_abc123", messages=[...], total_messages=50, returned_messages=20, has_more=True )

session_id
string
required

Session identifier

messages
MessageHistoryItem · object[]
required

Message history

total_messages
integer
required

Total messages in session

returned_messages
integer
required

Messages returned

has_more
boolean
required

Whether more messages available