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

# GET Export Analytics

> Export analytics data as CSV or JSON.

## Export analytics

`GET /api/analytics/export`

Export analytics data for reporting purposes.

### Headers

**Cookie** `string` *required*

Session cookie (login via POST /api/auth/login)

**startDate** `string` *required*

Start date (ISO 8601)

**endDate** `string` *required*

End date (ISO 8601)

**type** `string`

Data type: `messages`, `campaigns`, or `contacts`

**format** `string` (default: csv)

Export format: `csv` or `json`

```bash cURL theme={null}
curl "https://zeplo.ai/api/analytics/export?startDate=2026-01-01&endDate=2026-01-31&format=csv" \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -o analytics.csv
```

Returns a file download with the requested format.

***

## Dashboard statistics

`GET /api/dashboard/stats`

Get overall dashboard statistics.

```json Response theme={null}
{
  "success": true,
  "data": {
    "totalContacts": 5000,
    "totalConversations": 1200,
    "totalMessages": 25000,
    "totalCampaigns": 12,
    "unreadConversations": 45,
    "activeAutomations": 5,
    "messagesToday": 350,
    "contactsThisWeek": 120
  }
}
```

***

## Admin dashboard

`GET /api/dashboard/admin/stats`

`GET /api/dashboard/user/stats`


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