Skip to main content
POST
Error

Authorizations

X-API-Key
string
header
required

API key authentication

Query Parameters

contactStructureId
string<mongo-id>
required

The contact structure the contacts belong to

cancelIncomplete
boolean
default:false

Set to true to cancel the structure's unfinished imports (UPLOADING, UPLOADED, MAPPING or MAPPED) and a migration still being prepared, then continue. Left out or false, the request is refused with ImportInProgressError while any of them exists and nothing is cancelled. A RUNNING import is never cancelled, with or without this.

Body

application/json
headers
string[]
required

Column names, in order and distinct, not blank, and not proto, constructor or prototype; the first row of the file the import is built from

Required array length: 1 - 200 elements
Required string length: 1 - 100
Pattern: \S
Example:
rows
string[][]
required

One array of cell values per contact, each with exactly as many cells as there are headers

Required array length: 1 - 6500 elements
Maximum array length: 200

Plain, unescaped text; Benchmark stores it HTML-entity escaped.

Maximum string length: 1000
Example:

Response

Import created; the rows are being parsed

_id
string

Id of the import

fileName
string

Original name of the uploaded file

firstTenRecords
string[][]

The first ten data rows, each as an array of cell values in column order

headers
string[]

Column headers of the uploaded file, in file order

status
enum<string>

Current status. An import moves through UPLOADING (file being parsed), UPLOADED (ready for a mapping), MAPPING (mapping being applied), MAPPED (ready to start), RUNNING, then SUCCEEDED or FAILED. ABORTED is set by an explicit abort or when a new import for the same contact structure is started with cancelIncomplete=true.

Available options:
UPLOADING,
UPLOADED,
MAPPING,
MAPPED,
RUNNING,
SUCCEEDED,
FAILED,
ABORTED
totalRecords
number

Number of data rows in the uploaded file