List Call Legs
Returns the list of Call Legs, optionally filtered by parameters. This method supports pagination.
Basic Authorization header using the BASIC scheme. Use a pair companySid:token to access the API.
In: header
Query Parameters
Call Sid.
^(CA)[0-9a-f]{48}$Call Leg status.
Value in
- "Ringing"
- "Answered"
- "Completed"
Call Leg direction.
Value in
- "Inbound"
- "Outbound"
Originating (caller) Phone Number or SIP URI.
If it is a SIP URI, it must start with the sip: or sips: prefix, and must be formatted
according to RFC 3261 standard. Examples of valid SIP URI:
sip:user@server.com:5060sip:user@server.com;transport=TLSsip:user@server.com?header1=value1&header2=value2sip:user@server.com:5060;transport=TCP?header=value
length <= 256Terminating (callee) Phone Number or SIP URI.
If it is a SIP URI, it must start with the sip: or sips: prefix, and must be formatted
according to RFC 3261 standard. Examples of valid SIP URI:
sip:user@server.com:5060sip:user@server.com;transport=TLSsip:user@server.com?header1=value1&header2=value2sip:user@server.com:5060;transport=TCP?header=value
length <= 256Date and time, that Call Leg creation date should be greater than or equal to.
Must have ISO format (e.g. yyyy-MM-dd'T'HH:mm:ss).
date-timeDate and time, that Call Leg creation date should be less than.
Must have ISO format (e.g. yyyy-MM-dd'T'HH:mm:ss).
date-timeint321 <= value <= 10000Possible values:
-
Ascending
-
Descending
Value in
- "Ascending"
- "Descending"
If true, fees are included into result.
Response Body
curl -X GET "https://example.com/v1/CallLegs"{ "items": [ { "sid": "string", "callSid": "string", "from": "+12145678900", "to": "+19876543210", "status": "Ringing", "direction": "Inbound", "duration": "string", "createdOn": "2023-09-09T15:00:00.000Z", "rangOn": "2023-09-09T15:00:00.000Z", "answeredOn": "2023-09-09T15:00:00.000Z", "completedOn": "2023-09-09T15:00:00.000Z", "fees": [ { "count": 0, "feePerUnit": 0, "total": 0 } ] } ], "searchId": "string"}{ "errors": { "Name": [ "The Name field is required." ] }, "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title": "One or more validation errors occurred.", "status": 400, "detail": "Some detailed message", "traceId": "|4ef17786-b103-420e-89c0-cc425ac14809.edfcbee9_"}