API referenceContacts

Import contacts from CSV

POST/contacts/imports

Send the CSV (up to 50 MB) as the body with Content-Type: text/csv. consent is required: how these people agreed to receive marketing email. The file needs an email column; other columns map to names, unsubscribed, external_id and properties by name. Imports run in the background.

Authorization

apiKey
AuthorizationBearer <token>

A project API key: Authorization: Bearer s0_…

In: header

Query Parameters

consent*string
Length3 <= length <= 1000
list_ids?string
Lengthlength <= 420
update_existing?string

Value in

  • "true"
  • "false"
filename?string
Length1 <= length <= 255

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/contacts/imports?consent=string"
{  "object": "contact_import",  "id": "string",  "status": "uploading",  "filename": "string",  "consent": "string",  "list_ids": [    "string"  ],  "update_existing": true,  "size_bytes": 0,  "columns": {    "fields": {      "property1": "string",      "property2": "string"    },    "properties": [      "string"    ],    "ignored": [      "string"    ]  },  "rows_processed": 0,  "rows_created": 0,  "rows_updated": 0,  "rows_skipped": 0,  "rows_failed": 0,  "error": "string",  "created_at": "2019-08-24T14:15:22Z",  "started_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}