List CDR legs (partition-wide)
const url = 'https://example.com/v1/pt/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cdrs/legs';const options = { method: 'GET', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"call_ulid":"example","leg_uuid":"example","leg_role":"example","node_id":"example","direction":"example","sip_source_user":"example","sip_source_realm":"example","sip_source_addr":"example","sip_dialed_user":"example","sip_dialed_realm":"example","sip_dialed_addr":"example","codec":"example","resource_type":"example","resource_id":"example","route_trunk":"example","dialed_before":"example","dialed_after":"example","callerid_name":"example","callerid_number":"example","pai":"example","attestation":"example","sip_call_id":"example","sip_identity":"example","disposition":"example","hangup_originator":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/v1/pt/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/cdrs/legs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "call_ulid": "example", "leg_uuid": "example", "leg_role": "example", "node_id": "example", "direction": "example", "sip_source_user": "example", "sip_source_realm": "example", "sip_source_addr": "example", "sip_dialed_user": "example", "sip_dialed_realm": "example", "sip_dialed_addr": "example", "codec": "example", "resource_type": "example", "resource_id": "example", "route_trunk": "example", "dialed_before": "example", "dialed_after": "example", "callerid_name": "example", "callerid_number": "example", "pai": "example", "attestation": "example", "sip_call_id": "example", "sip_identity": "example", "disposition": "example", "hangup_originator": "example" }'Returns leg rows across every namespace the partition owns, in the [from, to] window. CSV is selected with the Accept: text/csv request header (JSON is the default); there is no format query parameter. Rows may be substring-filtered via the CdrLegFilter fields, supplied as query parameters and/or a JSON body.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Partition UUID
Query Parameters
Section titled “Query Parameters”Per-field substring filter for the /legs listing, supplied as individual query parameters named for the leg columns (e.g. ?direction=inbound&sip_source_user=1509). All are AND-matched case-insensitively. The same fields may instead (or additionally) be sent as a JSON request body; a query value wins over a body value for the same field. See the CdrLegFilter schema for the full field list.
Substring filter for the flat /legs listing. Every field set is AND-matched case-insensitively against the corresponding leg column; omit a field to leave it unconstrained. The same object may be supplied two ways: as query-string parameters (?direction=inbound&codec=ulaw) or as a JSON request body. When a field appears in both, the query value wins.
object
Opaque pagination cursor from previous page’s next_cursor
Maximum items to return
Request Body
Section titled “Request Body”Optional substring filter as a JSON object (alternative to the query parameters). Query values win over body values for the same field.
Substring filter for the flat /legs listing. Every field set is AND-matched case-insensitively against the corresponding leg column; omit a field to leave it unconstrained. The same object may be supplied two ways: as query-string parameters (?direction=inbound&codec=ulaw) or as a JSON request body. When a field appears in both, the query value wins.
object
Examplegenerated
{ "call_ulid": "example", "leg_uuid": "example", "leg_role": "example", "node_id": "example", "direction": "example", "sip_source_user": "example", "sip_source_realm": "example", "sip_source_addr": "example", "sip_dialed_user": "example", "sip_dialed_realm": "example", "sip_dialed_addr": "example", "codec": "example", "resource_type": "example", "resource_id": "example", "route_trunk": "example", "dialed_before": "example", "dialed_after": "example", "callerid_name": "example", "callerid_number": "example", "pai": "example", "attestation": "example", "sip_call_id": "example", "sip_identity": "example", "disposition": "example", "hangup_originator": "example"}Responses
Section titled “Responses”OK. Response body is JSON by default, or CSV when the request sent Accept: text/csv.
object
object
JSON call-detail (NumberInfo) enrichment collected when a modify block set collect-numberinfo.
Examplegenerated
{ "success": true, "legs": [ { "call_ulid": "example", "leg_uuid": "example", "parent_leg_uuid": "example", "leg_role": "example", "node_id": "example", "nsid": "example", "partition_id": "example", "direction": "example", "sip_source_user": "example", "sip_source_realm": "example", "sip_source_addr": "example", "sip_dialed_user": "example", "sip_dialed_realm": "example", "sip_dialed_addr": "example", "codec": "example", "resource_type": "example", "resource_id": "example", "route_trunk": "example", "dialed_before": "example", "dialed_after": "example", "callerid_name": "example", "callerid_number": "example", "pai": "example", "attestation": "example", "sip_call_id": "example", "sip_identity": "example", "event_start": "2026-04-15T12:00:00Z", "event_end": "2026-04-15T12:00:00Z", "answer_start": "2026-04-15T12:00:00Z", "billing_start": "2026-04-15T12:00:00Z", "ringing_start_time": "2026-04-15T12:00:00Z", "billable_ms": 1, "total_ms": 1, "disposition": "example", "q850_cause": 1, "hangup_originator": "example", "answered": true, "completed": true, "cdr_schema_version": 1, "rtp_rx_loss": 1, "rtp_tx_loss": 1, "rtp_rx_jitter": 1, "rtp_tx_jitter": 1, "rtp_rtt": 1, "rtp_rx_mes": 1, "rtp_tx_mes": 1, "rtp_rx_count": 1, "rtp_tx_count": 1, "rtp_stats": "example", "number_info": "example" } ], "next_cursor": "example"}default
Section titled “default”Error response
RFC 7807 Problem Details
object
Problem type slug URI
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example"}