This page documents the canonical HTTP contract for this endpoint.
This route requires an authenticated user session and blocks developer API keys. It returns JSON with a download_url; it does not stream the CSV response. The URL points to a signed storage URL or /api/leads/export/local-file/{filename} in the local fallback, and the caller makes a second GET to that URL. Only files belonging to the authenticated user and organization are eligible; optional task_id scopes the lookup. expires_in_hours is present for signed Azure URLs and absent on the local fallback. Signature values are redacted here.
Path parameters
filenamerequiredstring
Export filename (e.g. leads_export_20260425_120000.csv).
| Name | Type | Description |
|---|---|---|
| filenamerequired | string | Export filename (e.g. leads_export_20260425_120000.csv). |
Query parameters
task_id· optionalstring
Optional export task ID for authorization fallback.
| Name | Type | Description |
|---|---|---|
| task_id | string | Optional export task ID for authorization fallback. |
Errors
| Status | Meaning |
|---|---|
| 400 | Invalid filename. |
| 401 | Missing or invalid user session. |
| 403 | Developer API keys are blocked for this session-only route. |
| 404 | Export file not found or expired. |
