Skip to content
dimmiDocs

Contacts and companies

Upload an import file

POST/api/v1/imports

Authorization

Authorizationstringrequired

An API token, sent as Bearer <token>.

Needs the contacts:write ability

Body

application/json
filenamestring

filename of the file being uploaded

Format: binary

namestring

general purpose name for multipart form value

Response 201

Created
dataobjectrequired
Show child attributes
columnsstring[] | nullrequired

The file's header row: the column names in order.

created_atstringrequired

When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.

Format: date-time

created_countintegerrequired

How many records the import has created so far.

Format: int32

errorstring | nullrequired

Why the whole import failed, in words. Null unless its status is failed.

error_report_urlstring | nullrequired

API path of the report listing every failed row, such as /api/v1/imports/imp_.../errors. Null when no row failed.

errorsobject[] | nullrequired

The first failed rows, at most 20, each with its line in the file and why it failed.

Show child attributes
messagestringrequired

Why the row could not be imported, in plain words.

rowintegerrequired

Line of the file the failed row is on.

Format: int64

failed_countintegerrequired

How many rows could not be imported so far.

Format: int32

file_expired_atstring | nullrequired

When the uploaded file was deleted, 30 days after the import finished. Null while the file is still kept.

Format: date-time

file_namestringrequired

Name of the uploaded file, such as customers.csv.

finished_atstring | nullrequired

When the import completed or failed. Null until then.

Format: date-time

idstringrequired

The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.

kindstringrequired

What the file holds: contacts (customers) or companies.

mappingobject[] | nullrequired

The chosen mapping: which column fills which field. Empty until the import is started.

Show child attributes
columnintegerrequired

The position of the file's column, counted from 0.

Format: int64

fieldstringrequired

The field the column fills: email, name, external_id, phone, domain, company_name, company_domain, tags, or attribute.<key> for a custom attribute.

modestringrequired

What happens to a row matching an existing record: update changes that record, skip leaves it alone.

objectstringrequired

The kind of record this is, the same for every record of its kind, such as article.

previewstring[][] | nullrequired

The first 5 data rows of the file, each a list of cell texts in column order.

processed_rowsintegerrequired

How many rows have been handled so far; compare with row_count for progress.

Format: int32

rollbackobjectrequired
Show child attributes
errorstring | nullrequired

Why undoing the import failed, in words. Null unless the undo's status is failed.

finished_atstring | nullrequired

When the undo completed or failed. Null until then.

Format: date-time

keptintegerrequired

How many records the undo left as they are, because they changed or were used since the import.

Format: int32

kept_recordsobject[] | nullrequired

The first kept records, at most 100, each with its id, name and why it was kept.

Show child attributes
idstringrequired

The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.

namestringrequired

Name of the record the undo left as it is.

reasonstringrequired

Why the record was kept, such as Changed since the import. or Has had a conversation since the import.

processedintegerrequired

How many records the undo has handled so far; compare with total for progress.

Format: int32

removedintegerrequired

How many records the undo deleted because the import had created them.

Format: int32

requested_atstring | nullrequired

When undoing the import was asked for.

Format: date-time

revertedintegerrequired

How many records the undo put back to what they were before the import.

Format: int32

statusstringrequired

Where undoing the import stands: queued, running, completed or failed.

totalintegerrequired

How many records the undo has to go through.

Format: int32

rollback_untilstring | nullrequired

The time until which the import can be undone, 7 days after it finished. Null while it has not finished.

Format: date-time

row_countintegerrequired

How many data rows the file holds.

Format: int32

skipped_countintegerrequired

How many rows were left out so far, such as rows matching an existing record in skip mode.

Format: int32

started_atstring | nullrequired

When the import began running. Null while it is a draft or queued.

Format: date-time

statusstringrequired

Where the import stands: draft (uploaded, not started), queued, running, completed or failed.

suggested_mappingobject[] | nullrequired

The mapping guessed from the file's column names, to confirm or change before starting.

Show child attributes
columnintegerrequired

The position of the file's column, counted from 0.

Format: int64

fieldstringrequired

The field the column fills: email, name, external_id, phone, domain, company_name, company_domain, tags, or attribute.<key> for a custom attribute.

updated_countintegerrequired

How many existing records the import has changed so far.

Format: int32

Response error

Error
codestringrequired

Stable code for programs to tell errors apart, such as validation_failed or internal_error.

errorsobject

Each rejected field mapped to its messages. Only present when the input was invalid.

messagestringrequired

What went wrong, in words safe to show a person.