Skip to main content

Get Call Details

Retrieve comprehensive details for a specific contact center call.

HTTP Request​

GET /v2/accounts/<account_sid>/calls/<call_sid>

Regional URLs​

RegionBase URL
Indiahttps://ccm-api.exotel.com
Singaporehttps://ccm-api.exotel.sg

Path Parameters​

ParameterTypeDescription
account_sidStringYour Exotel account SID
call_sidStringThe unique identifier of the call

Authentication​

Use your API key as the username and API token as the password in HTTP Basic Auth.

Example Request​

curl -X GET \
'https://<api_key>:<api_token>@ccm-api.exotel.com/v2/accounts/<account_sid>/calls/<call_sid>' \
-H 'Content-Type: application/json'

Example Response​

{
"request_id": "req_abc123",
"http_code": 200,
"response": {
"code": 200,
"status": "success",
"call_details": {
"call_sid": "cabfb1dfa8c5e1c7f2c458423b7716b3",
"call_state": "terminal",
"call_status": "completed",
"direction": "outbound",
"virtual_number": "+911414941199",
"from": "+919900XXXXXX",
"to": "+918800XXXXXX",
"start_time": "2024-06-15T10:30:00+05:30",
"end_time": "2024-06-15T10:35:12+05:30",
"duration": 312,
"talk_time": 295,
"recording_url": "https://s3-ap-south-1.amazonaws.com/exotel-recordings/.../recording.mp3",
"custom_field": "agent_id=A001",
"agent_details": {
"user_id": "agent_uuid_001",
"name": "John Agent",
"email": "john@company.com"
},
"customer_details": {
"number": "+918800XXXXXX"
}
}
}
}

Response Fields​

FieldTypeDescription
call_sidStringUnique identifier for the call
call_stateStringLifecycle state of the call. See Call State Values
call_statusStringOutcome of the call. See Call Status Values
directionStringinbound or outbound
virtual_numberStringThe Exotel virtual number used for the call
fromStringCaller's phone number in E.164 format
toStringRecipient's phone number in E.164 format
start_timeDateTimeISO 8601 timestamp when the call started
end_timeDateTimeISO 8601 timestamp when the call ended
durationIntegerTotal elapsed time of the call in seconds (from dial to disconnect)
talk_timeIntegerActual connected conversation time in seconds
recording_urlStringURL of the call recording MP3 file (present only if recording was enabled)
custom_fieldStringCustom metadata attached to the call at initiation
agent_details.user_idStringUnique identifier of the agent who handled the call
agent_details.nameStringDisplay name of the agent
agent_details.emailStringEmail address of the agent
customer_details.numberStringCustomer's phone number in E.164 format

Call State Values​

ValueDescription
activeCall is currently in progress
terminalCall has ended (final state)

Call Status Values​

ValueDescription
completedCall was answered and ended normally
agent_unansweredAgent did not answer the call
customer_unansweredCustomer did not answer the call
agent_cancelledCall was cancelled by the agent before connection
failedCall could not be established due to a system or network error

Status Callback Webhook Payload​

When a status callback URL is configured on the call, the following data is sent to your webhook at each event:

FieldTypeDescription
call_sidStringCall identifier
event_typeStringanswered when connected; terminal when the call ends
call_stateStringCurrent call state at the time of the event
durationIntegerCall duration in seconds at the time of the event
recording_urlStringRecording URL (included on terminal event if recording was enabled)

HTTP Status Codes​

CodeDescription
200Success
400Bad Request — Invalid parameters
401Unauthorized — Invalid API credentials
404Not Found — call_sid does not exist for this account
429Too Many Requests — Rate limit exceeded
500Internal Server Error