This page documents the canonical HTTP contract for this endpoint.
The route requires an authenticated user with user-admin permission and companies:write. Mapping values are multipart form fields containing JSON objects; core mappings map Company target fields to a CSV header alias or list of aliases. use_async defaults true; when false, the request is processed inline and returns a completion object instead of a queued task receipt. Poll the returned task ID only for asynchronous admission.
Body parameters
filerequiredfile
CSV file uploaded as multipart/form-data.
source_label· optionalstring
Optional source label.
core_field_mappings· optionalJSON object
Multipart form field containing JSON: target core field -> source CSV header alias or alias list, e.g. {"name":["Company Name"],"domain":"Website"}.
custom_field_mappings· optionalJSON object
Multipart form field containing JSON: custom-field key -> source CSV header alias or alias list.
custom_field_static_values· optionalJSON object
Optional fixed custom-field values applied to imported records.
use_async· optionalboolean
Use background processing; default true.
null_policy· optionalstring
CSV null handling: common (default; blanks and common null tokens become empty) or preserve (literal tokens are retained).
| Name | Type | Description |
|---|---|---|
| filerequired | file | CSV file uploaded as multipart/form-data. |
| source_label | string | Optional source label. |
| core_field_mappings | JSON object | Multipart form field containing JSON: target core field -> source CSV header alias or alias list, e.g. {"name":["Company Name"],"domain":"Website"}. |
| custom_field_mappings | JSON object | Multipart form field containing JSON: custom-field key -> source CSV header alias or alias list. |
| custom_field_static_values | JSON object | Optional fixed custom-field values applied to imported records. |
| use_async | boolean | Use background processing; default true. |
| null_policy | string | CSV null handling: common (default; blanks and common null tokens become empty) or preserve (literal tokens are retained). |
Errors
| Status | Meaning |
|---|---|
| 400 | Malformed JSON mapping form field or invalid null_policy. |
| 401 | Authentication and organization/user context required. |
| 403 | Missing companies:write scope or user-admin permission. |
| 503 | CSV storage or background-job admission failed. |
