Query CDR List (v2.0)
Query the CDR list.
Note: This documentation applies to API version 2.0.
Request URL
GET {base_url}/{api_path}/cdr/list?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| page | No | Integer | Define which page is displayed. Note: If
this parameter is left blank, the response result will
return the first page by default. |
| page_size | No | Integer | Define how many records per page. Maximum value: 10,000 Note: If this parameter is
left blank, the response result will return 10,000 records
per page by default. |
| order_by | No | String | Define the display order. Valid value:
|
| sort_by | No | String | Define the sorting field. Valid value:
|
| call_from | No | String | The number and name of the caller. |
| call_to | No | String | The number and name of the callee. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
| total_number | Integer | The total number of CDR. |
| data | Array<CDR_Details> | The detailed information of the CDR. |
- CDR_Details
-
Parameter Type Description id Integer The sequence number of the record. uid String The unique ID of the CDR. time String The time when the call was made or received. call_type String Communication type. InboundOutboundInternal
call_from String The number and name of the caller. call_from_name String The name of the caller. call_from_number String The number of the caller. call_to String The number and name of the callee. call_to_name String The name of the callee. call_to_number String The number of the callee. second_participant String The callee in the second call leg. second_participant_name String The name of the callee in the second call leg. second_participant_number String The number of the callee in the second call leg. last_participant String The callee in the last call leg. last_participant_name String The name of the callee in the last call leg. last_participant_number String The number of the callee in the last call leg. last_status String The final status of the call. ANSWEREDNO ANSWERABANDONEDBUSYFAILEDVOICEMAIL
queues Object<Queue> The queue information and call status. ivrs Array The IVR name and number. ring_groups Object<Ring_Group> The ring group information and call status. call_flows Array The call flow name and number. call_duration Integer The time between the call started and the call ended. routing_duration Integer The time between the call started and the call answered. handling_duration Integer The time between the call answered and the call ended, including any hold time. call_notes Object<Call_Note> The call note of the call. disconnected_by String The party that terminated the call. Extension: Internal extension.External: External number.System: A party not involved in the call.Note: This could happen when an incoming call is not answered within the maximum waiting time, or when it is interrupted by an emergency call.
segments Integer The number of call legs. ai_receptionist Array<AI_Receptionist> The information of AI receptionists. source_trunks Array The call was received via which trunk. destination_trunks Array The call was sent out via which trunk. dids Array The phone number that the caller dialed and the associated name. outbound_caller_ids Array The phone number that was displayed on the callee's phone. pin_codes Array The PIN code used to make outbound calls via a PIN-restricted outbound route and recorded in the CDR.
Examples
Request example
GET /openapi/v2.0/cdr/list?access_token=wiO21GxXLYmZABJBqsXy6oeIJ45Evr4T&page=1&page_size=2 HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Response example
HTTP/1.1 200 OK { "errcode": 0, "total_number": 277, "data": [ { "id": "67AE6498-7D80008A", "uid": "20260612100344A5466", "time": "2026/06/12 10:03:44", "call_type": "Outbound", "call_from": "Dialer", "call_from_name": "", "call_from_number": "Dialer", "call_to": "Becky<1002>", "call_to_name": "Becky", "call_to_number": "1002", "second_participant": "Queue 6400<6400>", "second_participant_name": "6400", "second_participant_number": "6400", "last_participant": "6400:Evelyn<3200>", "last_participant_name": "Evelyn", "last_participant_number": "3200", "last_status": "ANSWERED", "queues": [ { "name": "6400", "number": "6400", "status": "ANSWERED" } ], "ivrs": null, "ring_groups": null, "call_flows": null, "call_duration": 44, "routing_duration": 7, "handling_duration": 37, "call_notes": null, "disconnected_by": "Extension", "segments": 3, "source_trunks": [ "2839" ], "destination_trunks": [ "2839" ], "dids": null, "outbound_caller_ids": [ "6700" ], "pin_codes": null }, { "id": "67AE63FD-9D8000E7", "uid": "202606121000595F345", "time": "2026/06/12 10:00:59", "call_type": "Outbound", "call_from": "Dialer", "call_from_name": "", "call_from_number": "Dialer", "call_to": "Becky<1002>", "call_to_name": "Becky", "call_to_number": "1002", "second_participant": "Queue 6400<6400>", "second_participant_name": "6400", "second_participant_number": "6400", "last_participant": "6400:Evelyn<3200>", "last_participant_name": "Evelyn", "last_participant_number": "3200", "last_status": "ANSWERED", "queues": [ { "name": "6400", "number": "6400", "status": "ANSWERED" } ], "ivrs": null, "ring_groups": null, "call_flows": null, "call_duration": 50, "routing_duration": 7, "handling_duration": 43, "call_notes": null, "disconnected_by": "External", "segments": 3, "source_trunks": [ "2839" ], "destination_trunks": [ "2839" ], "dids": null, "outbound_caller_ids": [ "6700" ], "pin_codes": null } ] }