Call History & Recordings

Read call detail records and download call recordings for reporting, archiving, or your CRM.

Two of the most common integrations are reporting on call activity and copying call recordings to your own storage or CRM. Both start with call detail records (CDRs): one record per call leg, with the times, parties, and call IDs you need to find the recording.

Read call history

Request CDRs for a domain within a time range:

curl "https://api.365sip.com/ns-api/v2/domains/~/cdrs?datetime-start=2026-11-18T00:00:00Z%5BAmerica/Indiana/Indianapolis%5D&datetime-end=2026-11-19T00:00:00Z%5BAmerica/Indiana/Indianapolis%5D&limit=100&start=0" \
  -H "Authorization: Bearer YOUR_API_KEY"
EndpointReturns
GET /domains/{domain}/cdrsCalls for a whole domain
GET /domains/{domain}/users/{user}/cdrsCalls for one user
GET /domains/{domain}/cdrs/countThe number of calls and total minutes, without the records

Useful query parameters on the domain endpoint:

ParameterUse it to
datetime-start, datetime-endSet the time range. See Time zones.
limit, startPage through results. See Errors & Pagination.
typeFilter by direction: Inbound, Outbound, On-net, Off-net, Missed, or Received
siteOnly include calls for one site
groupOnly include calls for one department
caller, dialledSearch by caller ID or dialed number. Partial matches work.

Time zones

datetime-start and datetime-end accept several formats, including a time zone in square brackets:

2026-11-18 13:00:00
2026-11-18T13:00:00Z
2026-11-18T13:00:00-05:00
2026-11-18T13:00:00-05:00[America/Indiana/Indianapolis]

Times in the response use the same format you sent, so include the time zone you want your report in. In a URL, encode the brackets as %5B and %5D.

Large exports

For a large date range, call /cdrs/count first to see how many records there are, then page through them with limit and start. For very large exports, request one day or one month at a time.

Find a call's recording

Each CDR includes call IDs for the two sides of the call:

CDR fieldWhat it identifies
call-orig-call-idThe originating side of the call (the caller's leg)
call-term-call-idThe terminating side of the call (the leg to the called party)
call-parent-call-idThe original call, when this leg was part of a transfer or forward

Recordings are stored per call leg, so look up the recording with the leg's call ID. To get both sides of a call, request the recording for each call ID.

curl https://api.365sip.com/ns-api/v2/domains/~/recordings/CALL_ID \
  -H "Authorization: Bearer YOUR_API_KEY"
EndpointUse when
GET /domains/{domain}/recordings/{callid}Your credential covers the domain, for example an archiving integration
GET /domains/{domain}/users/{user}/recordings/{callid}The user was a party to the call

The response is a list of recordings for that call ID. Each entry includes:

FieldDescription
file-access-urlWhere to download the recording
file-duration-secondsLength of the recording
file-size-kilobytesSize of the file
call-recording-statusStatus of the recording
call-recording-started-datetime, call-recording-ended-datetimeWhen recording started and stopped

Troubleshooting

Why doesn't a call have a recording?

A call only has a recording if audio was recorded for that leg. Common reasons there isn't one:

  • The call wasn't answered, or went to voicemail.
  • The call was forwarded off-net or transferred, so the leg you looked up didn't carry the conversation. Try the other call IDs on the CDR.
  • No audio passed on the call, so the recording is empty.
  • Call recording isn't turned on for the user or domain.
I get a recording entry, but the file is empty

The call connected but no audio was exchanged, for example a call that was hung up immediately. Check file-duration-seconds and file-size-kilobytes before downloading.

I get 'invalid scope' or 403 Forbidden

Your credential doesn't have permission for that data. For example, the domain recording endpoint needs access to the whole domain, not just one user. Check your API key's access with GET /apikeys/~, and contact Level365 support if it needs to change. See User scopes.

Records are missing from a large date range

Split the range into smaller windows, such as one day at a time, and page through each one with limit and start. Compare against /cdrs/count to confirm you received every record.


Did this page help you?