Skip to main content

Preview a lead CSV import

Upload a CSV to inspect detected headers, sample rows, suggested field mappings, detected types, and required-field coverage. This is a preview; it does not import leads.

POST/api/leads/import/preview
HTTP referenceScope leads:writeUpdated September 27, 2026

This page documents the canonical HTTP contract for this endpoint.

The response example is abridged; mappings and detected_types depend on the uploaded file and mapping analysis. standard_fields is the static standard-field catalog, not inferred from the uploaded file. Use the import endpoint only after reviewing the preview and mappings.

Body parameters

  • filerequired

    file<text/csv>

    CSV file uploaded as multipart form data.

  • sample_size · optional

    integer

    Maximum sample rows shown; runtime clamps this to at least 1 and no more than the row count.

  • null_policy · optional

    string

    common treats configured common null tokens as empty; preserve retains input values.

Errors

StatusMeaning
401Authentication is missing or invalid.
403The credential is invalid or lacks the required scope.
400The CSV cannot be parsed.
500Preview mapping failed.

Docs