---
title: "Request export"
method: POST
path: "/export"
tags: ["Export"]
---

# Request export

`POST /export`

## Request

- Base URL: `https://app.freyavoice.ai/api/v2`
- URL: `https://app.freyavoice.ai/api/v2/export`
- Auth: HTTP bearer

Requests a data export from one of the supported endpoints. The export can be delivered as a direct download URL or sent via email.

**Supported Endpoints:**
- `/api/v2/call` - Export calls
- `/api/v2/campaign` - Export campaigns
- `/api/v2/phone-numbers` - Export phone numbers
- `/api/v2/solutions/runs` - Export solution runs
- `/api/v2/problems` - Export feedback/problems

**Export Formats:**
- `csv` - Comma-separated values
- `xlsx` - Excel spreadsheet
- `markdown` - Markdown table
- `json` - JSON array

The `params` object should include the same query parameters you would use when calling the endpoint directly, including `workspaceId`.

## Request body

- PostExportRequest
  - `endpoint` '/api/v2/call' | '/api/v2/campaign' | '/api/v2/phone-numbers' | '/api/v2/solutions/runs' | '/api/v2/problems', required: API endpoint to export data from
  - `params` object, required: Query parameters to pass to the endpoint (must include workspaceId)
  - `format` 'csv' | 'xlsx' | 'markdown' | 'json': Export file format
  - `deliveryMethod` 'download' | 'email': How to deliver the export
  - `email` string, email, nullable: Email address for email delivery

## Response `200`

Export ready or email sent

- object
  - `success` true, required
  - `data` object, required
    - `message` string, required
    - `result` PostExportResponse, required
      - `success` boolean, required
      - `downloadUrl` string, uri: Signed URL to download the export
      - `message` string, required

## Other responses

- `400`: Validation error
- `401`: Missing or invalid token
- `429`: Too many export requests
- `500`: Server error
- `503`: Email export not configured

---

[API](https://skmtc.dev/freyavoice/apis/freyavoice-api.md) - [All operations](https://skmtc.dev/freyavoice/apis/freyavoice-api/llms.txt) - [OpenAPI document](https://skmtc.dev/freyavoice/apis/freyavoice-api/revisions/153d120f0c73?raw)
