Skip to content
dimmiDocs

Contacts and companies

Dry run an import

POST/api/v1/imports/{import}/previews

Authorization

Authorizationstringrequired

An API token, sent as Bearer <token>.

Needs the contacts:write ability

Path parameters

importstringrequired

Id of the import, starting with imp_, such as imp_01jx2m8k4t. Find it with GET /imports.

Body

application/json
mappingobject[] | nullrequired

A list of {column, field}: column is the index in the header from 0; field is email, name, external_id, phone, company_name, company_domain or tags for contacts, name, domain, external_id or tags for companies, or attribute.<key>. For the real run, send the same mapping as the dry run.

Maximum items: 200

Show child attributes
columnintegerrequired

Which column of the uploaded file this is, counted in the header from 0, so the first column is 0. It must be a column the file has, such as 2.

Format: int64 · Minimum: 0

fieldstringrequired

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

Maximum length: 120

modestringrequired

What happens to records already there: update changes them, skip leaves them alone. Such as "skip".

Available options:updateskip

Response 200

OK
dataobjectrequired
Show child attributes
createdintegerrequired

How many records the dry run would create.

Format: int64

errorsobject[] | nullrequired

The rows the dry run found would fail, each with its line in the file and why.

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

failedintegerrequired

How many rows the dry run found would fail.

Format: int64

objectstringrequired

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

rowsintegerrequired

How many rows the dry run read.

Format: int64

skippedintegerrequired

How many rows the dry run would skip.

Format: int64

updatedintegerrequired

How many existing records the dry run would change.

Format: int64

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.