POST
/contacts/importsCreate a contact import
Creates a contact import from a CSV file. Include the file and optionally provide a column mapping, conflict strategy, segments, or topic subscriptions for imported contacts.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Multipart form data for a contact import. Include the CSV file and optionally configure field mappings, conflict handling, segments, and topics.
filestringrequired
CSV file to import. Maximum size is 50MB.
column_mapstringoptional
JSON-encoded object mapping contact fields and custom property keys to CSV column names. Supports `email`, `first_name`, `last_name`, `unsubscribed`, and `properties`. Custom property mappings can include `type` as `string`, `number`, or `boolean`; defaults to `string`.
on_conflictstringoptional
Strategy to use when an imported contact already exists.
segmentsstringoptional
JSON-encoded array of segments to add imported contacts to.
topicsstringoptional
JSON-encoded array of topic subscriptions to apply to imported contacts. Each `subscription` must be `opt_in` or `opt_out`.
201Returns the created contact import's UUID and the response object type.
objectstringoptional
Type of the response object.
idstringoptional
Unique identifier for the created contact import.
Error handling
file is required and must not exceed 50 MB. on_conflict must be upsert or skip, and each topic subscription must use opt_in or opt_out; column_map, segments, and topics must contain JSON-encoded data when supplied.