Skip to main content

Export download

Resolve the download URL for a completed leads export file.

GET/api/leads/export/download/{filename}
HTTP referenceScope authenticated user sessionUpdated April 25, 2026

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

  • filenamerequired

    string

    Export filename (e.g. leads_export_20260425_120000.csv).

Query parameters

  • task_id · optional

    string

    Optional export task ID for authorization fallback.

Errors

StatusMeaning
400Invalid filename.
401Missing or invalid user session.
403Developer API keys are blocked for this session-only route.
404Export file not found or expired.

Docs