> 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-report-api-documentation.md).

# Popin Export Report API Documentation

The **Popin Export Report API** allows you to **export and download reports** related to:

* Customer call logs
* Scheduled video calls

Reports can be fetched for a specific date using a simple API request.

***

### 🔗 API Endpoint

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

***

### 🔐 Authentication

You must use an **API key** to access this endpoint.

#### 🔑 How to Generate Your 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         | Value              |
| -------------- | ------------------ |
| `X-API-KEY`    | Your API key       |
| `Content-Type` | `application/json` |

***

### 📥 Request Body

| Field  | Type   | Required | Description                                                               |
| ------ | ------ | -------- | ------------------------------------------------------------------------- |
| `type` | string | ✅ Yes    | `"call_report"` for call logs or `"scheduled_report"` for scheduled calls |
| `date` | string | ✅ Yes    | Report date in `YYYY-MM-DD` format                                        |

#### 📦 Example Request Body

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

***

### 🧪 Sample 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"
}'
```

> Replace `<your-api-key>` with your actual API key.

***

### 📌 Important Notes

* `type` and `date` are **mandatory** fields.
* The `date` must be in **YYYY-MM-DD** format.
* Allowed `type` values:
  * `call_report`
  * `scheduled_report`
* If the API key is **missing or invalid**, the response will return:
  * **`401 Unauthorized`**

***

### ✅ Use Cases

* 📅 **Automate** daily exports of call logs.
* 📁 **Retrieve** scheduled call data for internal review or tracking.
* 🔄 **Integrate** reports with internal CRMs or dashboards.
* 📊 **Enable** data-driven decision-making through exports.
