> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wavix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export CDRs

> Streams matching call detail records as newline-delimited JSON (NDJSON), one record per line, for bulk export.



## OpenAPI

````yaml https://wavix.github.io/wavix-openapi/wavix-api.yaml get /v1/cdrs/all
openapi: 3.1.0
info:
  title: Wavix APIs
  description: >-
    Wavix provides robust APIs that let you integrate voice and text messaging
    features directly into your app. Send text, place calls, and access detailed
    reports  programmatically.
  termsOfService: https://wavix.com/terms-and-conditions
  license:
    name: MIT
    identifier: MIT
  contact:
    name: Wavix
    url: https://wavix.com
    email: support@wavix.com
  version: '1.0'
servers:
  - url: https://api.wavix.com
    description: https://api.wavix.com
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: SIP trunks
    description: SIP trunks
  - name: Buy
    description: Numbers
  - name: Cart
    description: Numbers
  - name: My numbers
    description: Numbers
  - name: Billing
    description: Billing, transactions, and invoices
  - name: Profile
    description: Account profile and customer information
  - name: CDRs
    description: Call detail records and call history
  - name: Speech Analytics
    description: Call transcription and speech analytics
  - name: SMS and MMS
    description: Messaging
  - name: Number Validator
    description: Phone number validation
  - name: Link shortener
    description: Short link and click metrics
  - name: 2FA
    description: Two-factor authentication
  - name: 10DLC
    description: 10DLC Campaigns and Brands
  - name: API Keys
    description: API key management
  - name: Call webhooks
    description: Webhook configuration for call events
  - name: Call control
    description: Programmable Voice
  - name: Call streaming
    description: Real-time call audio streaming over WebSocket
  - name: Call recording
    description: Call recording
  - name: Sub-accounts
    description: Sub-account management
  - name: Voice campaigns
    description: Outbound voice campaigns
  - name: Wavix Embeddable
    description: WebRTC embeddable widget
paths:
  /v1/cdrs/all:
    get:
      tags:
        - CDRs
      summary: Export CDRs
      description: >-
        Streams matching call detail records as newline-delimited JSON (NDJSON),
        one record per line, for bulk export.
      operationId: cdrs_list_all
      parameters:
        - name: from
          in: query
          description: Start of the date range to query, in `YYYY-MM-DD` format. Inclusive.
          required: true
          style: form
          explode: true
          schema:
            type: string
            format: date
            example: '2023-01-01'
        - name: to
          in: query
          description: End of the date range to query, in `YYYY-MM-DD` format. Inclusive.
          required: true
          style: form
          explode: true
          schema:
            type: string
            format: date
            example: '2023-09-01'
        - name: type
          in: query
          description: >-
            Filters CDRs by call direction. One of `placed` (outbound calls
            dialed by the account) or `received` (inbound calls answered by the
            account).
          required: true
          style: form
          explode: true
          schema:
            type: string
            example: received
        - name: disposition
          in: query
          description: >-
            Filters CDRs by call disposition. One of `answered` (the called
            party answered), `busy` (the called party was busy), `rejected` (the
            call was declined), `failed` (the call could not be routed), or
            `all` (no disposition filter).
          style: form
          explode: true
          schema:
            allOf:
              - $ref: '#/components/schemas/CallDisposition'
        - name: from_search
          in: query
          description: >-
            Filters CDRs by originating phone number. Accepts a full or partial
            number.
          style: form
          explode: true
          schema:
            type: string
            example: '13524815863'
        - name: to_search
          in: query
          description: >-
            Filters CDRs by destination phone number. Accepts a full or partial
            number.
          style: form
          explode: true
          schema:
            type: string
            example: '12565378257'
        - name: sip_trunk
          in: query
          description: Filters outbound CDRs by SIP trunk login. Ignored for inbound calls.
          style: form
          explode: true
          schema:
            type: string
            example: '12321'
        - name: uuid
          in: query
          description: Filters CDRs by the unique call ID.
          style: form
          explode: true
          schema:
            type: string
            example: 99df5ffd-962a-410f-bcce-d08f1f7f328c
        - name: page
          in: query
          description: Page number to retrieve. Default `1`.
          style: form
          explode: true
          schema:
            type: integer
            format: int32
            example: 1
        - name: per_page
          in: query
          description: Number of records to return per page. Default `25`.
          style: form
          explode: true
          schema:
            type: integer
            format: int32
            default: 25
            example: 25
      responses:
        '200':
          description: Returns an NDJSON stream of CDRs, one record per line.
          headers:
            Content-Type:
              description: Media type of the response body. Always `application/x-ndjson`.
              schema:
                type: string
                example: application/x-ndjson
            Last-Modified:
              description: Timestamp when the exported data was last modified.
              schema:
                type: string
                example: '0'
            ETag:
              description: Entity tag identifying the version of the exported data.
              schema:
                type: string
                example: '0'
          content:
            application/x-ndjson:
              schema:
                type: string
                description: NDJSON stream of CDR records, one per line.
              example: >-
                {"charge":"0.0059","date":"2023-08-28T15:43:31.000Z","destination":"My
                trunk","disposition":"answered","duration":26,"forward_fee":"0.0","from":"13524815863","per_minute":"0.0059","to":"12565378257","uuid":"99df5ffd-962a-410f-bcce-d08f1f7f328c"}

                {"charge":"0.00325","date":"2023-11-29T14:48:50.000Z","destination":"United
                States","disposition":"answered","duration":21,"from":"17182444444","per_minute":"0.0065","to":"18007009909","uuid":"aa566501-c591-4a8b-b3b9-cc1295398b72","forward_fee":"0.003"}
        '403':
          $ref: '#/components/responses/ForbiddenErrorResponse'
      deprecated: false
      security:
        - bearerAuth:
            - calls:read
components:
  schemas:
    CallDisposition:
      title: CallDisposition
      enum:
        - answered
        - noanswer
        - busy
        - failed
        - all
      type: string
      description: >-
        Final disposition of the call. One of `answered` (the called party
        answered), `noanswer` (no answer within the ring timeout), `busy` (the
        called party was busy), `failed` (the call could not be routed), or
        `all` (matches any disposition when used as a filter).
    ForbiddenErrorResponse:
      title: ForbiddenErrorResponse
      type: object
      properties:
        success:
          type: boolean
          description: >-
            Indicates whether the request was successful. Always `false` for
            this error.
          example: false
        message:
          type: string
          description: Human-readable description of why access is forbidden.
          example: The service is not provisioned for your account.
  responses:
    ForbiddenErrorResponse:
      description: Request failed. The feature is disabled for your account.
      headers: {}
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Wavix API key. Pass as `Authorization: Bearer <api_key>`. Keys support
        per-resource scopes (none / read / write). See [Restricted keys and
        scopes](https://docs.wavix.com/api-reference/authentication#restricted-keys-and-scopes).

````