This page documents the canonical HTTP contract for this endpoint.
The HTTP request is multipart form data. JSON-valued form parts must parse as an array/object as indicated. Headers must be unique and nonblank. Explicit mappings must reference actual CSV headers and supported standard lead fields; multiple sources may target email_addresses or phone_numbers, but other targets must be unique. Invalid or unusable mappings fail instead of silently importing unmapped rows.
Files with fewer than 100 rows are processed inline and return summary, crm_source, leads_created, and csv_nulls. Larger files return an asynchronous admission receipt, shown in the response example. Only poll when a task identifier is returned; admission is not proof of completed import. Poll the returned task identifier with Get lead import status.
Body parameters
filerequiredfile (multipart/form-data)
check_company_blacklist· optionalboolean
Defaults true.
check_email_blacklist· optionalboolean
Defaults true.
mappings· optionalstring (JSON array)
Entries use csv_column (an existing header) and standard_field (a supported lead target, such as email_addresses). Omit to infer mappings; explicit mappings bypass inference.
default_values· optionalstring (JSON object)
custom_field_static_values· optionalstring (JSON object)
null_policy· optionalstring
common or preserve; defaults to common.
| Name | Type | Description |
|---|---|---|
| filerequired | file (multipart/form-data) | - |
| check_company_blacklist | boolean | Defaults true. |
| check_email_blacklist | boolean | Defaults true. |
| mappings | string (JSON array) | Entries use csv_column (an existing header) and standard_field (a supported lead target, such as email_addresses). Omit to infer mappings; explicit mappings bypass inference. |
| default_values | string (JSON object) | - |
| custom_field_static_values | string (JSON object) | - |
| null_policy | string | common or preserve; defaults to common. |
Errors
| Status | Meaning |
|---|---|
| 400 | Invalid form JSON, duplicate/blank CSV headers, invalid or conflicting mappings, no usable mappings, or mapping application failure. |
| 401 | Missing authentication or organization/user context. |
| 403 | Missing leads:write scope. |
| 422 | Invalid multipart form field. |
| 503 | Asynchronous upload storage or import admission unavailable. |
