Skip to main content

Export leads

Queue a leads CSV export as a background task. Use selection or filter to specify which leads to export.

POST/api/leads/export
HTTP referenceScope authenticated user sessionUpdated April 25, 2026

This page documents the canonical HTTP contract for this endpoint.

This route currently requires an authenticated user session. Developer API keys are blocked by the backend for this route.

Body parameters

  • selection · optional

    object

    Bulk selection object with mode (ids or descriptor), descriptor filter, search, scope, etc.

  • filter · optional

    object

    FilterDescriptor tree (used when selection is omitted).

  • search · optional

    string

    Free-text search (used when selection is omitted).

  • sort · optional

    array<object>

    Sort specs.

  • column_ids · optional

    array<string>

    Preferred visible Lead column IDs; mutually exclusive with fields. Must resolve to exportable columns unless research_field_ids supplies an export column.

  • fields · optional

    array<string>

    Legacy Lead field names/aliases; mutually exclusive with column_ids and restricted to exportable standard or defined custom fields.

  • research_field_ids · optional

    array<string>

    Research column IDs to include.

  • source_table_id · optional

    string

    Research table context.

  • source_table_scope · optional

    string

    Research scope: company or lead.

  • scope · optional

    string

    Lead scope: org or user.

  • format · optional

    string

    Accepted by the request model; this route queues CSV.

Errors

StatusMeaning
400Invalid filter descriptor or export fields.
401Missing or invalid user session.
403Developer API keys are blocked for this session-only route.
503Export queue admission failed.

Docs