Skip to main content
You can use the Wavix API to query and export call detail records (CDRs) from your account with various parameters. CDRs include attributes such as time, duration, origination and destination numbers, and call price. CDRs have no retention period on the Wavix platform. This section shows you how to search for CDRs and get call metrics using the Wavix API.
The Wavix CDR API is available for both Flex and Flex Pro users.

Prerequisites

To get started, sign up for a Wavix account and find your API key.

Create a Wavix account

  1. Sign up for a Wavix account using your business email address.
  2. Confirm your email address and phone number during the sign-up process.
  3. Wait for your account to be approved by the Wavix team.
  4. After approval, choose either the Wavix Flex or Flex Pro account level.
Once your account is approved, you can access the Wavix app and APIs.

Find your API key

Wavix uses API keys to authenticate requests. To find API keys associated with your account:
  1. Sign in to your Wavix account.
  2. Go to AdministrationAPI Keys.
  3. Copy the API key you want to use, or create a new one by clicking Create new.

Retrieve CDRs from your account

You can request CDRs in either CSV or JSON format. The response format is defined in the request header. The Wavix platform also supports JSON streaming for CDRs. With the Wavix API, you can get near real-time:
  • Detailed records of every inbound, outbound, and missed call
  • Summary information about all inbound or outbound calls, including total duration, total price, and the number of calls received or placed (JSON format only)
You can use CDRs to:
  • Monitor service disruptions
  • Analyze usage patterns and trends
The following example shows how to query CDRs on your Wavix account. Request example:
GET https://api.wavix.com/v1/cdr?type=placed&from=2021-02-10&to=2021-02-20&per_page=100&appid=your_api_key
Response example:
{
  "items": [
    {
      "date": "2021-02-10T10:07:06.376Z",
      "from": 12212123123,
      "to": 18001231233,
      "duration": 72,
      "charge": 0.01,
      "destination": "sip:36465@sip.example.com",
      "sip_trunk": "36465",
      "per_minute": 0.0059,
      "forward_fee": 0.0059
    }
  ],
  "pagination": {
    "total": 100,
    "total_pages": 10,
    "current_page": 2,
    "per_page": 10
  }
}
To query CDRs in CSV format, use the following example:
GET https://api.wavix.com/v1/cdr.csv?type=placed&from=2021-02-10&to=2021-02-20&per_page=100&appid=your_api_key
I