Retrieve details of all calls
This method lets you retrieve details of all completed calls. The maximum number of results that you can fetch with a single API call is 20.
API Endpoint
Arguments
All of these optional arguments let you filter which calls you retrieve details for.
Column Name | Description |
---|---|
from_number | The number from which the calls were made. You can filter by the exact number or prefix. |
to_number | The destination number of the call. You can filter by the exact number or prefix. |
call_direction | Direction of the call. Allowed values: inbound , outbound . |
bill_duration | Billed duration of the call in seconds. Can be filtered with: bill_duration , bill_duration__gt , bill_duration__gte , bill_duration__lt , bill_duration__lte . |
end_time | Timestamp when the call ended. Accepts format: YYYY-MM-DD HH:MM[:ss[.uuuuuu]] . Can be filtered with: end_time , end_time__gt , end_time__gte , end_time__lt , end_time__lte . |
hangup_cause_code | Hangup cause code used to filter calls. See the list of hangup causes. |
hangup_source | Source that caused the hangup. Allowed values: customer , carrier , zentrunk . |
limit | Limits the number of returned results. Maximum is 20. Default: 20. |
offset | Number of items to skip before returning results. Used for pagination. |
stir_verification | Indicates STIR/SHAKEN verification status. Allowed values: - Verified : Caller ID verified (Attestation A) - Not Verified : Uncertain/Not verified (Attestation B or C) - Not Applicable : STIR/SHAKEN not applicable (e.g. non-US calls). |
Calls made only in the last 90-days can be retrieved via APIs.
You can combine these filters to get call detail records that were added during a particular time range.
If you don’t use the end_time filter when you search, Plivo uses a search window of the last seven days from the current date. Alternatively, you can use end_time__[lt|lte]
and end_time__[gt|gte]
to search a range of times for CDRs of up to 30 days of search boundary. If the provided range exceeds the 30-day boundary, the API will return a 400 response code, signaling an error.
Timestamp values need to be specified as UTC.
Returns
Returns the call objects that match the filters specified in the request.