Skip to main content
GET
/
v1
/
sessions
List Sessions
curl --request GET \
  --url https://api.agentmark.co/v1/sessions \
  --header 'Authorization: <api-key>' \
  --header 'X-Agentmark-App-Id: <x-agentmark-app-id>'
{
  "sessions": [
    {
      "id": "session-1712764245",
      "name": "Customer Support Chat #12345",
      "traceCount": 5,
      "totalTokens": 2340,
      "totalCost": 0.012,
      "totalDuration": 4521.3,
      "firstTrace": 1712764245123,
      "lastTrace": 1712764260456
    }
  ]
}

Authorizations

Authorization
string
header
required

Your AgentMark API key. Create one in the dashboard under Settings > API Keys.

Example: Authorization: Bearer am_live_abc123

Headers

X-Agentmark-App-Id
string
required

Your application ID. Found in the dashboard under Settings > General.

Example:

"app_abc123"

Query Parameters

limit
integer
default:50

Maximum number of sessions to return.

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

Number of sessions to skip for pagination.

Required range: x >= 0
name
string

Partial match on session name.

userId
string

Filter by user ID.

Response

A list of sessions.

sessions
object[]