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.
Name
Type
Description
filerequired
file<text/csv>
CSV file uploaded as multipart form data.
sample_size
integer
Maximum sample rows shown; runtime clamps this to at least 1 and no more than the row count.
null_policy
string
common treats configured common null tokens as empty; preserve retains input values.
Errors
Status
Meaning
401
Authentication is missing or invalid.
403
The credential is invalid or lacks the required scope.