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

# Download Call History

> Downloads call history data in CSV format. Supports bulk download of call records with optional filtering. Use 'include_analysis=true' to include call analysis data (platform_analysis and client_analysis) in the export.

## Download Call History

This endpoint queues call history data for download and sends it via email. The export includes comprehensive call records with optional filtering capabilities.

<Warning>
  **Email Delivery**:

  * Large datasets may take several minutes to process
  * You'll receive an email with the download link once processing is complete
</Warning>

## Key Features

* **Comprehensive Data Export**: Includes call details, transcripts, recordings, and metadata
* **Flexible Filtering**: Filter by date range, agent, status, and more
* **Analysis Data**: Optionally include call analysis and insights
* **Email Delivery**: Secure download link sent to your email

## Export Format

The download contains a CSV file with the following data:

* Call basic information (ID, numbers, duration, cost)
* Call status and timestamps
* Agent and campaign details
* Transcript and recording URLs
* Custom variables and analysis data (when enabled)

## Important Notes

* **Processing Time**: Large exports may take 5-10 minutes to process
* **File Size**: Very large datasets are automatically compressed


## OpenAPI

````yaml post /calling/history/download
openapi: 3.0.0
info:
  title: Revenueable AI API Documentation
  description: >-
    This is the documentation for the Revenueable AI APIs. The Revenueable AI
    API follows RESTful principles, making it intuitive and easy to integrate
    with your applications. All API requests should be made to the base URL. The
    API accepts and returns data in JSON format. Ensure your requests include
    the appropriate Content-Type header for POST and PATCH requests.
  version: 2.0.0
servers:
  - url: https://prod-api.revenueable.ai/ca/api/v0
security: []
tags:
  - name: workspace
    description: Endpoints for managing your workspace.
  - name: agent
    description: Endpoints for managing assistants (agents).
  - name: calling
    description: Endpoints for making and managing calls.
  - name: campaign
    description: Endpoints for managing campaigns.
  - name: analytics
    description: Endpoints for accessing call analytics and performance metrics.
  - name: termination
    description: Endpoints for terminating active calls using different methods.
  - name: knowledgebase
    description: Endpoints for managing knowledge bases.
paths:
  /calling/history/download:
    post:
      tags:
        - calling
      summary: Download Call History
      description: >-
        Downloads call history data in CSV format. Supports bulk download of
        call records with optional filtering. Use 'include_analysis=true' to
        include call analysis data (platform_analysis and client_analysis) in
        the export.
      operationId: downloadCallHistory
      parameters:
        - name: X-API-KEY
          in: header
          description: (Required) Your Revenueable AI API key.
          required: true
          schema:
            type: string
            example: 7251cb4b-3373-43a4-844c-b27a1d45e0c9
        - name: start_date
          in: query
          description: Filter calls starting from this date (ISO 8601 format with timezone)
          required: false
          schema:
            type: string
            format: date-time
            default: '2025-09-25T00:00:00+05:30'
            example: '2025-09-25T00:00:00+05:30'
        - name: end_date
          in: query
          description: Filter calls up to this date (ISO 8601 format with timezone)
          required: false
          schema:
            type: string
            format: date-time
            default: '2025-09-25T23:59:59+05:30'
            example: '2025-09-25T23:59:59+05:30'
        - name: agent_id
          in: query
          description: Filter by agent ID(s) - can be repeated for multiple agents.
          required: false
          schema:
            type: array
            items:
              type: string
            example:
              - 830f767a-397e-4b39-82ff-235cd344e2f9
        - name: status
          in: query
          description: Filter by call status.
          required: false
          schema:
            type: string
            example: completed
        - name: include_analysis
          in: query
          description: >-
            Include call analysis data (platform_analysis and client_analysis)
            in the export.
          required: false
          schema:
            type: boolean
            default: false
            example: true
        - name: call_type
          in: query
          description: Filter by call type.
          required: false
          schema:
            type: string
            enum:
              - inbound
              - outbound
              - webcall
            example: outbound
        - name: bulk_list_id
          in: query
          description: Filter by bulk list ID.
          required: false
          schema:
            type: string
            example: 123e4567-e89b-12d3-a456-426614174000
        - name: voicemail
          in: query
          description: Filter by voicemail status.
          required: false
          schema:
            type: boolean
            example: false
        - name: from_number
          in: query
          description: Filter by caller phone number.
          required: false
          schema:
            type: string
            example: '+1234567890'
        - name: to_number
          in: query
          description: Filter by callee phone number.
          required: false
          schema:
            type: string
            example: '+0987654321'
        - name: call_id
          in: query
          description: Filter by specific call ID.
          required: false
          schema:
            type: string
            example: 550e8400-e29b-41d4-a716-446655440000
        - name: limit
          in: query
          description: Maximum number of call records to download.
          required: false
          schema:
            type: integer
            default: 1000
            example: 5000
        - name: offset
          in: query
          description: Number of call records to skip for pagination.
          required: false
          schema:
            type: integer
            default: 0
            example: 100
      responses:
        '200':
          description: Call history download successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Success message when email format is used
                    example: >-
                      Call history export has been queued. You will receive an
                      email shortly.
                example:
                  message: >-
                    Call history export has been queued. You will receive an
                    email shortly.
            application/octet-stream:
              schema:
                type: string
                format: binary
                description: ZIP file containing CSV call history data
            application/zip:
              schema:
                type: string
                format: binary
                description: >-
                  ZIP file containing CSV call history data with headers like:
                  id, to_number, name, status, transcript, recording_url,
                  agent_id, initiation_time, etc.
        '400':
          description: Bad Request - Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: invalid_parameter
                      message:
                        type: string
                        example: Invalid date format
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: 401 Unauthorized
                      message:
                        type: string
                        example: Invalid credentials
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: 500 Internal Server Error
                      message:
                        type: string
                        example: An unexpected error occurred
      x-code-samples:
        - lang: curl
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://prod-api.revenueable.ai/ca/api/v0/calling/history/download?start_date=2025-09-25T00:00:00%2B05:30&end_date=2025-09-25T23:59:59%2B05:30&agent_id=830f767a-397e-4b39-82ff-235cd344e2f9&status=completed&include_analysis=true&call_type=outbound&bulk_list_id=123e4567-e89b-12d3-a456-426614174000&voicemail=false&from_number=%2B1234567890&to_number=%2B0987654321&call_id=550e8400-e29b-41d4-a716-446655440000&limit=5000&offset=0' \
              --header 'X-API-KEY: <x-api-key>'

````