import os
from sarj_platform_sdk import SDK
sdk = SDK(api_key_auth=os.environ["SARJ_API_KEY"])
res = sdk.calls.get_call(call_id="call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b")
call = res.data
print(f"Status: {call.status}, duration: {call.duration}")
{
"data": {
"id": "call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b",
"status": "completed",
"phone_number": "+966512345678",
"scenario_id": "550e8400-e29b-41d4-a716-446655440000",
"language": "ar",
"direction": "outbound",
"variables": {
"customer_name": "Ahmad",
"order_id": "ORD-123"
},
"duration": 142,
"recording_url": "https://storage.googleapis.com/sarj-recordings/calls/8f9b2c1e.mp4?X-Goog-Signature=...",
"transcript": [
{
"role": "assistant",
"content": "Hello Ahmad, calling about order ORD-123."
},
{
"role": "user",
"content": "Yes, hi."
},
{
"role": "assistant",
"content": "Your order is ready for delivery tomorrow."
}
],
"report": {
"generated_at": "2026-04-12T10:33:41Z",
"outcome": {
"status": "success",
"reason": "The customer confirmed the delivery appointment for tomorrow.",
"success_criteria": [
{
"text": "Customer confirms the delivery slot",
"achieved": true,
"is_primary": true
}
]
}
},
"created_at": "2026-04-12T10:30:00Z",
"updated_at": "2026-04-12T10:32:22Z",
"started_at": "2026-04-12T10:30:05Z",
"ended_at": "2026-04-12T10:32:22Z"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"type": "unauthorized",
"message": "Authentication required."
},
"meta": {}
}{
"error": {
"type": "no_organization",
"message": "API key is not associated with an organization."
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"type": "call_not_found",
"message": "Call call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b was not found.",
"call_id": "call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Calls
Fetch Sarj.ai voice call details by call_id
Fetch details of a Sarj.ai voice call by call_id: status, phone_number, scenario_id, language, direction (inbound/outbound), scenario variables, duration (seconds), recording_url (signed download link), transcript (list of spoken messages), report (post-call outcome with success-criteria results; generated asynchronously shortly after completed calls, null otherwise), and timestamps (created_at, updated_at, started_at, ended_at). Use this whenever the user asks about a specific call, phone conversation, or voice interaction by its call_id — do not query other tools.
GET
/
calls
/
{call_id}
import os
from sarj_platform_sdk import SDK
sdk = SDK(api_key_auth=os.environ["SARJ_API_KEY"])
res = sdk.calls.get_call(call_id="call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b")
call = res.data
print(f"Status: {call.status}, duration: {call.duration}")
{
"data": {
"id": "call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b",
"status": "completed",
"phone_number": "+966512345678",
"scenario_id": "550e8400-e29b-41d4-a716-446655440000",
"language": "ar",
"direction": "outbound",
"variables": {
"customer_name": "Ahmad",
"order_id": "ORD-123"
},
"duration": 142,
"recording_url": "https://storage.googleapis.com/sarj-recordings/calls/8f9b2c1e.mp4?X-Goog-Signature=...",
"transcript": [
{
"role": "assistant",
"content": "Hello Ahmad, calling about order ORD-123."
},
{
"role": "user",
"content": "Yes, hi."
},
{
"role": "assistant",
"content": "Your order is ready for delivery tomorrow."
}
],
"report": {
"generated_at": "2026-04-12T10:33:41Z",
"outcome": {
"status": "success",
"reason": "The customer confirmed the delivery appointment for tomorrow.",
"success_criteria": [
{
"text": "Customer confirms the delivery slot",
"achieved": true,
"is_primary": true
}
]
}
},
"created_at": "2026-04-12T10:30:00Z",
"updated_at": "2026-04-12T10:32:22Z",
"started_at": "2026-04-12T10:30:05Z",
"ended_at": "2026-04-12T10:32:22Z"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"type": "unauthorized",
"message": "Authentication required."
},
"meta": {}
}{
"error": {
"type": "no_organization",
"message": "API key is not associated with an organization."
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"type": "call_not_found",
"message": "Call call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b was not found.",
"call_id": "call_8f9b2c1e-4a5d-4f6e-8b1a-2c3d4e5f6a7b"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Authorizations
API key from your Sarj.ai dashboard. Pass as: Authorization: Bearer
Path Parameters
Last modified on August 19, 2026

