> For the complete documentation index, see [llms.txt](https://popin.gitbook.io/popin-developer-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://popin.gitbook.io/popin-developer-hub/popin-export-api-documentation.md).

# Popin Export API Documentation

### Popin Export API Documentation

The Popin Export API allows you to programmatically download call reports or scheduled call reports from your Popin dashboard.

***

#### Base Endpoint

```
https://dashboard.popin.to/api/v1/export
```

***

#### Authentication

All requests to the API must include a valid API key in the request headers.

**Steps to Generate API Key**

1. Log in to your Popin Dashboard
2. Navigate to **Settings → Developers**
3. Select **Popin Report API**
4. Click **Generate API Key**

***

#### Request Headers

| Header Name  | Description                 | Required |
| ------------ | --------------------------- | -------- |
| X-API-KEY    | Your API authentication key | Yes      |
| Content-Type | Must be `application/json`  | Yes      |

***

#### Request Body

The API accepts a JSON payload with the following fields:

| Field | Type   | Description                                                                 |
| ----- | ------ | --------------------------------------------------------------------------- |
| type  | string | Type of report to export. Allowed values: `call_report`, `scheduled_report` |
| date  | string | Date for which the report is required (format: `YYYY-MM-DD`)                |

**Example Request Body**

```json
{
  "type": "call_report",
  "date": "2025-07-04"
}
```

***

#### Report Types

| Value             | Description                      |
| ----------------- | -------------------------------- |
| call\_report      | Retrieves call logs              |
| scheduled\_report | Retrieves scheduled call records |
| customer\_report  | Retrieves customer records       |

***

#### Example cURL Request

```bash
curl --location 'https://dashboard.popin.to/api/v1/export' \
--header 'X-API-KEY: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
  "type": "call_report",
  "date": "2025-07-04"
}'
```

***

#### Notes

* Ensure the `date` field follows the `YYYY-MM-DD` format.
* Replace `<your-api-key>` with your actual API key.
* Invalid or missing API keys will result in authentication errors.
* The API response will contain the requested report data based on the provided parameters.
