POST contacts/import

Save multiple contact records from a JSON array. All records in array must match in structure! The structure is defined by the first record. All records must contain an email address. Max of 1000 records at a time. Suppressed contact records cannot be unsuppressed through this endpoint.

* required

Parameters

Name Type Description
contacts * array Array of JSON objects (up to 1000) containing contact data. Each object should contain key/value pairs for every field being imported. If custom field data is included, it should be in a nested object named "customFields". e.g. "customFields":{"custom1":{"value":"Example value"},{"custom2":{"value":"Example value"}}}
1000
groupIDs array[integer] Add all imported contacts to these groups. Contacts cannot be added to dynamic groups.
removeGroupIDs array[integer] Remove all imported contacts from these groups
updateExisting boolean Update existing records with data provided. If set to "0", existing records will be not be updated, but will still be added/removed from groups. Existing records are matched on email address.
1

Response Data

Name Type Description
recordsUpdated integer Number of existing records updated by import
recordsInserted integer Number of new records created by import
recordsInData integer Total records passed in
contactResults array Array of objects containing results for each row from the contacts argument (the order will be the same). Changes to group membership are not included. Each row will contain: email, contactID (only populated if success equals true), success, inserted, updated, and errors. e.g "contacts":[{"email": "john.doe1@example.com", "contactID": 123, "success": 1, "inserted": 1, "updated": 0, "errors": []}]

Permissions

Method requires the Contacts (Import) permission

Example Calls

Basic Import

POST
/contacts/import
cURL
Copy
Response Data

Import With Failed Rows

Individual rows can fail independently from the API call itself. If a row has an error, it will still be included in the "contactResults", success will be 0, and the errors array will contain details about the error. In addition, the top-level "warnings" key will include details about the error.

POST
/contacts/import
cURL
Copy
Response Data

Import With Custom Fields

POST
/contacts/import
cURL
Copy
Response Data

API Console

The console uses production data, so BE CAREFUL!
POST
contacts/import
Request Body
{"groupIDs":"","updateExisting":"1","removeGroupIDs":"","contacts":[]}
Access token: *