CSV Export
Data export in CSV format for external analysis. Requires supervisor role or above.
Endpoints
| Method | Endpoint | Description | Minimum Role |
|---|---|---|---|
GET | /api/v1/export/calls.csv | Export calls | supervisor |
GET | /api/v1/export/customers.csv | Export customers | supervisor |
GET | /api/v1/export/links.csv | Export access links | supervisor |
Export Calls
Returns a CSV file with call data.
GET /api/v1/export/calls.csvQuery Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
date_from | string | 30 days ago | Start date (ISO 8601) |
date_to | string | today | End date (ISO 8601) |
status | string | - | Filter by status |
department_id | uuid | - | Filter by department |
Request Example
bash
curl -X GET "https://voki.avanter.com.br/api/v1/export/calls.csv?date_from=2026-02-01&date_to=2026-02-18" \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-o calls.csvResponse
Returns Content-Type: text/csv with the file:
csv
id,status,department,attendant,customer_name,customer_email,duration,wait_time,rating,started_at,completed_at
1a2b3c4d-5e6f-7890-abcd-ef1234567890,completed,Suporte Técnico,João Silva,Carlos Ferreira,carlos@email.com,345,12,5,2026-02-15T14:30:00Z,2026-02-15T14:35:45ZExport Customers
GET /api/v1/export/customers.csvRequest Example
bash
curl -X GET "https://voki.avanter.com.br/api/v1/export/customers.csv" \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-o customers.csvResponse
csv
id,name,email,phone,document,call_count,last_call_at,created_at
2a3b4c5d-6e7f-8901-bcde-f23456789012,Carlos Ferreira,carlos@email.com,+5511999998888,123.456.789-00,5,2026-02-15T14:30:00Z,2026-01-10T09:00:00ZExport Access Links
GET /api/v1/export/links.csvQuery Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
status | string | - | Filter by status (active, used, expired, cancelled) |
department_id | uuid | - | Filter by department |
Request Example
bash
curl -X GET "https://voki.avanter.com.br/api/v1/export/links.csv?status=used" \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-o links.csvResponse
csv
id,token,status,department,customer_name,customer_email,expires_at,used_at,created_at
6e7f8a9b-0c1d-2345-fghi-678901234567,abc123def456,used,Suporte Técnico,Carlos Ferreira,carlos@email.com,2026-02-25T23:59:59Z,2026-02-20T10:15:00Z,2026-02-18T10:00:00Z