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

multipart/form-data
import-file
file
required

The CSV file. The first row must be the column headers.

Response

Import created; the file is 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