Finish session
Marks a session as COMPLETED (stoppingReason provided) or FAILED (error provided). At least one of stoppingReason or error must be provided. See Sessions.
Authorizations
API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....
Path Parameters
Session ID
Body
Response
Session finished successfully
"session_123"
"custom_session_123"
"ver_123"
"user_123"
"tc_123"
Structured context data. For plain text context, format is { value: "..." }
{ "value": "Session context information" }"GOAL_ACHIEVED"
Canonical storage URI of the full-call recording for a telephony-evaluation session. Null for non-telephony sessions or before the recording is processed. Resolve to a playable URL via GET /storage?uri=.
"s3://galtea-bucket/audio/org_123/session_abc-recording.mp3"
"External API responded with HTTP 422: Unprocessable Entity — {\"detail\":\"model not found\"}"
PENDING, COMPLETED, FAILED "PENDING"
True when the session represents real production traffic (no associated test case).
false
{ "key": "value" }