Skip to navigation

Get traces

View as Markdown

Returns the event trace of an interaction: each turn with its speech recognition (ASR), LLM, translation, text-to-speech (TTS) and tool-call events, plus interaction-level events such as conversation start and end and post-call analysis. input and output vary by event_type. A trace can include personal data: the user’s contact details, agent variables and the transcript. Returns 404 if no trace exists.

curl "https://apps.sarvam.ai/api/analytics/v1/$ORG_ID/$WORKSPACE_ID/$APP_ID/traces/$INTERACTION_ID" \
-H "X-API-Key: $SARVAM_API_KEY"

Path parameters

org_idstringRequired
Organization ID.
workspace_idstringRequired
Workspace ID.
app_idstringRequired

Agent ID. Copy it from the agent’s ··· menu in the dashboard (Copy agent ID).

interaction_idstringRequiredformat: "^[0-9]{8}/.+$"

From List interactions, in the form <YYYYMMDD>/<id>, e.g. 20261007/9f1c2a7e-4b3d-4e8a-a1f0-6c2d9b7e5a14. Send the slash as is or as %2F.

Headers

X-API-KeystringRequired
Your workspace API key.

Response

The interaction's event trace.
interaction_idstring
The interaction this trace belongs to.
lifecycle_eventslist of objectsOptional

Interaction-level events: conversation start and end, their logs, post-call analysis, and errors.

turnslist of objectsOptional
The conversation's turns, in order, each with its events.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error