curl --request GET \
--url https://{host}/api/public/analytics/projects/{projectId}/traces \
--header 'x-api-key: <api-key>'{
"traces": [
{
"traceId": "trace-123",
"sessionId": "sess-123",
"environment": "production",
"channel": "web_chat",
"agentName": "Support Agent",
"deploymentId": "deploy-123",
"events": [
{
"eventId": "evt-123",
"eventSeq": 7,
"eventCursor": "cursor-7",
"payloadVersion": 1,
"eventType": "llm",
"eventName": "llm.call.completed",
"timestamp": "2026-08-05T14:30:00.000Z",
"ingestedAt": "2026-08-05T14:30:00.050Z",
"spanId": "span-123",
"reasonCode": null,
"operationType": "response_gen",
"agentExecutionPolicySource": "legacy_agent",
"responseContribution": "customer_visible",
"actor": {
"actorId": "agent-123",
"actorType": "agent",
"contactId": null
},
"durationMs": 842,
"hasError": false,
"isFailure": false,
"error": null,
"eventData": {
"model": "gpt-5.2",
"provider": "openai",
"inputTokens": 120,
"outputTokens": 35,
"totalTokens": 155,
"reasoningTokens": 5,
"cachedTokens": 20,
"audioInputTokens": 0,
"audioOutputTokens": 0,
"estimatedCost": {
"amount": 0.0021,
"currency": "USD"
},
"latencyMs": 842,
"streamingUsed": true,
"toolCallCount": 0,
"timeToFirstTokenMs": 180,
"cacheCreationTokens": 0,
"finishReason": "stop",
"retryAttempt": 0
}
}
]
}
],
"pageInfo": {
"hasMore": false,
"nextCursor": null
},
"meta": {
"fromDate": "2026-08-05T00:00:00.000Z",
"toDate": "2026-08-06T00:00:00.000Z",
"dataMode": "summary",
"sortOrder": "asc",
"supportedEventTypes": [
"llm",
"tool",
"decision",
"error"
],
"supportedEventNames": [
"llm.call.completed",
"llm.call.failed",
"tool.call.completed",
"tool.call.failed",
"tool.call.skipped",
"agent.decision"
],
"unsupportedEventNamesRequested": []
}
}List trace events
fromDate and toDate are required. fromDate is included in the results and
toDate is not, so a full day is
fromDate=2026-08-05T00:00:00Z&toDate=2026-08-06T00:00:00Z.
To page through results, pass the nextCursor value from the previous response
back as cursor. Keep every other parameter the same — a cursor is tied to the
filters, data mode, and sort order it was created with, and changing any of them
makes it invalid.
To fetch one specific event, filter by eventId. There is no separate
single-event endpoint.
If you request an event name this API does not support, it is ignored rather
than rejected, and listed back to you in meta.unsupportedEventNamesRequested.
curl --request GET \
--url https://{host}/api/public/analytics/projects/{projectId}/traces \
--header 'x-api-key: <api-key>'{
"traces": [
{
"traceId": "trace-123",
"sessionId": "sess-123",
"environment": "production",
"channel": "web_chat",
"agentName": "Support Agent",
"deploymentId": "deploy-123",
"events": [
{
"eventId": "evt-123",
"eventSeq": 7,
"eventCursor": "cursor-7",
"payloadVersion": 1,
"eventType": "llm",
"eventName": "llm.call.completed",
"timestamp": "2026-08-05T14:30:00.000Z",
"ingestedAt": "2026-08-05T14:30:00.050Z",
"spanId": "span-123",
"reasonCode": null,
"operationType": "response_gen",
"agentExecutionPolicySource": "legacy_agent",
"responseContribution": "customer_visible",
"actor": {
"actorId": "agent-123",
"actorType": "agent",
"contactId": null
},
"durationMs": 842,
"hasError": false,
"isFailure": false,
"error": null,
"eventData": {
"model": "gpt-5.2",
"provider": "openai",
"inputTokens": 120,
"outputTokens": 35,
"totalTokens": 155,
"reasoningTokens": 5,
"cachedTokens": 20,
"audioInputTokens": 0,
"audioOutputTokens": 0,
"estimatedCost": {
"amount": 0.0021,
"currency": "USD"
},
"latencyMs": 842,
"streamingUsed": true,
"toolCallCount": 0,
"timeToFirstTokenMs": 180,
"cacheCreationTokens": 0,
"finishReason": "stop",
"retryAttempt": 0
}
}
]
}
],
"pageInfo": {
"hasMore": false,
"nextCursor": null
},
"meta": {
"fromDate": "2026-08-05T00:00:00.000Z",
"toDate": "2026-08-06T00:00:00.000Z",
"dataMode": "summary",
"sortOrder": "asc",
"supportedEventTypes": [
"llm",
"tool",
"decision",
"error"
],
"supportedEventNames": [
"llm.call.completed",
"llm.call.failed",
"tool.call.completed",
"tool.call.failed",
"tool.call.skipped",
"agent.decision"
],
"unsupportedEventNamesRequested": []
}
}dataMode, either summary information or the complete sanitized request and response content.
Use dataMode=summary when you need operational information such as the event type, model, token usage, duration, cost, or error status without retrieving the event payloads. Use dataMode=full when you need the detailed sanitized request and response content associated with the events.
The endpoint requires a fromDate and toDate range. The start of the range is inclusive and the end is exclusive. You can further narrow the results by event type, event name, session, trace, event, agent, decision type, channel, environment, or error status. Results are paginated using a cursor; because pagination counts events before grouping them into traces, a page can contain fewer traces than the requested event limit.
Filters
fromDate— Required. Inclusive start timestamp for the time range.toDate— Required. Exclusive end timestamp for the time range.eventTypes— Filter by event category:llm— LLM callstool— Tool callsdecision— Agent decisionserror— LLM and tool failures
eventNames— Filter by specific event names:llm.call.completedllm.call.failedtool.call.completedtool.call.failedtool.call.skippedagent.decision
sessionIds— Filter events belonging to specific sessions; up to 10,000 session IDs.eventId— Return only the event with the specified ID. Use this when you need to retrieve a specific event; there is no separate single-event endpoint.traceId— Return only events belonging to the specified trace.agentName— Filter events produced by a specific agent. The value is matched exactly.decisionKind— Filter agent decision events by decision type, such asrouting,handoff,escalation, orcompletion.channel— Filter by the exact channel name recorded for the event. Unlike the Sessions endpoint, this filter does not support channel aliases.environment— Filter by environment:dev,staging,production, orworking-copy.hasError— Set totrueto return only events with errors,falseto return only events without errors, or omit the parameter to return both.
eventTypes filter accepts up to four categories. The eventNames filter accepts up to 20 names. Unsupported event names are ignored rather than rejected and are reported in meta.unsupportedEventNamesRequested.
Use GET when:
- You are retrieving trace data without requiring encrypted request parameters.
- You want to inspect or troubleshoot a specific event using
eventId. - You want to investigate a particular trace using
traceId. - You are analyzing events for one or more sessions using
sessionIds. - You need to query and page through trace data using standard URL parameters.
POST — List trace events with parameters in the request body
Use this endpoint when you need the same trace data and filtering capabilities as the GET endpoint, but want to send the query parameters in the request body instead of the URL. The POST endpoint accepts the same parameters and returns the same response as GET. The POST endpoint is particularly useful when request parameters must be encrypted. When request encryption is enabled for the Platform Key, send theTracesQueryBody as an encrypted JWE. When request encryption is disabled, send the same parameters as a plain JSON object. Response encryption is independent of request encryption; when enabled, responses other than 401 are returned as encrypted JWE payloads.
Filters and parameters
The POST endpoint supports the same filtering parameters as GET:fromDate— Required. Inclusive start timestamp.toDate— Required. Exclusive end timestamp.eventTypes— Filter by event category:llm,tool,decision, orerror.eventNames— Filter by specific supported event name.sessionIds— Filter by up to 10,000 session IDs.eventId— Retrieve a specific event.traceId— Filter events belonging to a specific trace.agentName— Filter by the exact agent name.decisionKind— Filter agent decision events by decision type.channel— Filter by the exact recorded channel name.environment— Filter by environment.hasError— Filter for events that have or do not have errors.dataMode— Selectsummaryorfullevent details.sortOrder— Sort results in ascending or descending order.
traceDimensions is not a parameter in this Traces API; do not use it with this endpoint.
Use POST method when:
- The request parameters must be encrypted.
- You want to avoid exposing potentially sensitive filter values in the URL.
- You need to send the query as a JSON object rather than URL query parameters.
Authorizations
Project-bound API key. Do not send an Authorization header.
Path Parameters
1Query Parameters
How many events to return. Counted before events are grouped into traces, so a page of 100 events may contain fewer than 100 traces.
1 <= x <= 10000Pass the nextCursor value from the previous response to get the next page.
Keep all other parameters unchanged.
1Filter by category of event. Pass one or more values, comma-separated or by
repeating the parameter. An unrecognised value is rejected with 400.
Each category covers a fixed set of event names: llm covers
llm.call.completed; tool covers tool.call.completed and
tool.call.skipped; decision covers agent.decision; and error covers
both failure events, llm.call.failed and tool.call.failed.
4llm, tool, decision, error Filter by specific event name, when eventTypes is broader than you need.
Pass up to 20 values, comma-separated or by repeating the parameter.
Unrecognised names are not rejected. They are ignored and returned to you in
meta.unsupportedEventNamesRequested, so only the names listed below will
actually select data.
20llm.call.completed, llm.call.failed, tool.call.completed, tool.call.failed, tool.call.skipped, agent.decision Filter to specific sessions. Pass up to 10,000 session IDs, comma-separated or by repeating the parameter.
100001Return only the event with this ID.
1Return only events belonging to this trace.
1Filter to events produced by this agent. Matched exactly; agent names are set by whoever built the project, so there is no fixed list.
1Filter agent decision events by the kind of decision made, for example
routing or escalation.
Matched exactly, and not restricted to a fixed list — new decision kinds can be added by the platform at any time, so an unrecognised value returns no results rather than an error. The values below are the ones currently in use.
1Filter by the channel the conversation took place on. Pass a single value; if you repeat the parameter only the first value is used, and a comma-separated list is treated as one literal value rather than a list.
Matched exactly as stored, with no alias handling. This differs from the
sessions endpoint, which accepts shorthand such as web or sms and
expands it. Here you must use the exact channel name: web_chat rather than
web, twilio_sms rather than sms, and the specific voice channel such
as voice_vxml or audiocodes rather than voice.
Not restricted to a fixed list, so an unrecognised value returns no results rather than an error, and a newly added channel works before the list below is updated.
http_async, slack, line, msteams, whatsapp, messenger, instagram, twilio_sms, zendesk, telegram, genesys, genesys_open_messaging, ai4w, kore_agent_assist, email, voice_vxml, korevg, audiocodes, genesys_audio_connector, voice_pipeline, voice_realtime, voice, voice_twilio, voice_livekit, ag_ui, a2a, sdk_websocket, web_debug, web_chat, api, http Filter by the environment the events were recorded in. Pass a single value; if you repeat the parameter only the first value is used.
Matched exactly as stored. Not restricted to a fixed list, so an unrecognised value returns no results rather than an error.
dev, staging, production, working-copy Set to true to return only events that failed, or false for only those
that succeeded. Omit to return both. Accepts true, false, 1, or 0.
How much detail to return per event. summary returns the key facts. full
adds the complete request and response content under
eventData.payloadData.
summary, full asc, desc Response
Trace event page returned successfully.
- Option 1
- Option 2
The traces on this page. One trace groups the events from a single run.
Show child attributes
Show child attributes
Paging information for this response.
Show child attributes
Show child attributes
Echo of the query that produced this response, plus the values this API supports.
Show child attributes
Show child attributes
Was this page helpful?