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

> ## Agent Instructions
> To search or read these docs, connect the Ringg docs MCP server at https://docs.ringg.ai/mcp (no key needed; tools search_ringg_ai and query_docs_filesystem_ringg_ai) instead of browsing pages one by one. Setup for each client: https://docs.ringg.ai/resources/mcp-server/docs-mcp-server/mcp-for-ai-assistants.md
> The dashboard labels agents "Assistants"; these docs say "agent". Both mean the same object, identified by agent_id.
> API base URL: https://prod-api.ringg.ai/ca/api/v0. Send the workspace API key in the X-API-KEY header, from server-side code only.
> Placing a call dials a real phone number and spends credits. Confirm the number with the user before calling.
> To act on a Ringg workspace (place calls, edit agents, read transcripts), use the separate Ringg workspace MCP server at https://mcp.ringg.ai/mcp: https://docs.ringg.ai/resources/mcp-server/workspace-mcp-server/overview.md

> Export call history to CSV by email, filtered by date range, agent, status, call type, campaign, number or call ID, with optional post-call analysis columns.

# Download Call History

export const RelatedTopics = ({items}) => <div className="not-prose mt-12">
    <div className="text-sm font-medium text-gray-500 dark:text-zinc-400 mb-3">Related topics</div>
    <div className="flex flex-col gap-2.5">
      {items.map(([title, href]) => <a key={href} href={href} className="flex items-center gap-2.5 text-sm text-gray-700 hover:text-gray-950 dark:text-zinc-300 dark:hover:text-white">
          <Icon icon="file-text" size={16} color="currentColor" />
          {title}
        </a>)}
    </div>
  </div>;

The response only confirms the export was queued: `{"message": "Call history export has been queued. You will receive an email shortly."}`. The download link arrives by email; large exports take several minutes.

## Notes

* `call_type` is `inbound`, `outbound` or `webcall`. The export covers every call that matches the filters.
* `include_analysis=true` adds the platform and [Advanced Analysis](/documentation/build-agents/customize-agent-behaviour/advanced-analysis) results.
* The CSV holds call details, status and timestamps, agent and campaign, transcript and recording links, and custom variables.
* The emailed link is valid for 7 days and downloads a ZIP with one CSV.
* Recording links in the export may expire; fetch a fresh link from [Get call details](/api-reference/monitoring/call-history/get-call-details).
* `409` means the same export is already running; `429` means too many exports are running, so try again later.

<RelatedTopics items={[["Get call history", "/api-reference/monitoring/call-history/get-call-history"]]} />


## OpenAPI

````yaml post /calling/history/download
openapi: 3.0.0
info:
  title: Ringg AI API Documentation
  description: >-
    The Ringg AI REST API. Base URL https://prod-api.ringg.ai/ca/api/v0; send
    your workspace API key in the X-API-KEY header from server-side code only.
    Requests and responses are JSON.
  version: 2.0.0
  contact:
    name: Ringg AI support
    email: admin@ringg.ai
    url: https://docs.ringg.ai
servers:
  - url: https://prod-api.ringg.ai/ca/api/v0
security: []
tags:
  - name: workspace
    description: Endpoints for managing your workspace.
  - name: agent
    description: Endpoints for managing 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: >-
        Queues a CSV export of call history and emails a download link to the
        requester. The link is valid for 7 days and downloads a ZIP with one
        CSV. Use `include_analysis=true` to add the post-call analysis columns.
      operationId: downloadCallHistory
      parameters:
        - name: X-API-KEY
          in: header
          description: (Required) Your Ringg AI API key.
          required: true
          schema:
            type: string
            example: rg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        - 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
            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
            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:
              - 00000000-0000-4000-8000-0000000000a1
        - name: status
          in: query
          description: Filter by call status.
          required: false
          schema:
            type: string
            enum:
              - registered
              - ongoing
              - retry
              - error
              - completed
              - failed
              - cancelled
              - forwarded
            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: '+14155550123'
        - name: call_id
          in: query
          description: Filter by specific call ID.
          required: false
          schema:
            type: string
            example: 550e8400-e29b-41d4-a716-446655440000
      responses:
        '200':
          description: The export was queued. The download link arrives by email.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Confirmation that the export was queued.
                    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.
        '400':
          description: Bad Request - Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid date format
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Invalid credentials
        '409':
          description: Conflict - The same export is already running.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '429':
          description: Too Many Requests - Too many exports are running; try again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: An unexpected error occurred
      x-code-samples:
        - lang: curl
          label: cURL
          source: |-
            curl --request POST \
              --url 'https://prod-api.ringg.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=00000000-0000-4000-8000-0000000000a1&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' \
              --header 'X-API-KEY: <x-api-key>'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.