Contacts and companies
Dry run an import
Authorization
AuthorizationstringrequiredAn API token, sent as Bearer <token>.
Needs the contacts:write ability
Path parameters
importstringrequiredId of the import, starting with imp_, such as imp_01jx2m8k4t. Find it with GET /imports.
Body
application/jsonmappingobject[] | nullrequiredA 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 attributesHide child attributes
columnintegerrequiredWhich 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
fieldstringrequiredThe 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
modestringrequiredWhat happens to records already there: update changes them, skip leaves them alone. Such as "skip".
Available options:updateskip
Response 200
OKdataobjectrequiredShow child attributesHide child attributes
createdintegerrequiredHow many records the dry run would create.
Format: int64
errorsobject[] | nullrequiredThe rows the dry run found would fail, each with its line in the file and why.
Show child attributesHide child attributes
messagestringrequiredWhy the row could not be imported, in plain words.
rowintegerrequiredLine of the file the failed row is on.
Format: int64
failedintegerrequiredHow many rows the dry run found would fail.
Format: int64
objectstringrequiredThe kind of record this is, the same for every record of its kind, such as article.
rowsintegerrequiredHow many rows the dry run read.
Format: int64
skippedintegerrequiredHow many rows the dry run would skip.
Format: int64
updatedintegerrequiredHow many existing records the dry run would change.
Format: int64
Response error
ErrorcodestringrequiredStable code for programs to tell errors apart, such as validation_failed or internal_error.
errorsobjectEach rejected field mapped to its messages. Only present when the input was invalid.
messagestringrequiredWhat went wrong, in words safe to show a person.