Bulk import contacts in address book with merge option

Bulk creates, or bulk updates, contacts in an address book with merge option

This operation bulk creates, or bulk updates, contacts in the import file and adds them to the specified address book.

Batch Calling Pattern

This method allows you submit data in bulk and works as part of the following calling pattern:

Bulk data upload calling patternBulk data upload calling pattern

Bulk data upload calling pattern

The method for polling for import job status is Get contact import status and the methods for getting the import job reports are Get contact import report and Get contact import report faults

🚧

Active contact imports are limited to 25

If you exceed this limit, you'll get the 'too many active imports' error.

File format

The import format can either be CSV or Excel. It must contain one column with the heading 'Email' or the translated equivalent if your account is using a language other than English. Any other columns will attempt to map to your custom contact data fields.

There is a 10MB file upload limit; if your file is larger than this, please break your upload into separate files.

File submission

You can call the method using either a JSON request (content-type: application/json) with the file data in base64 format, or by passing a file using a multipart form (content-type: multipart/form-data)

🚧

When using multipart form submissions

If using a multipart form submission to send the file, the server requires you to provide the filename parameter of the Content-Disposition header in the multipart body. Without this header, you'll receive the response { message: 'file must be valid' } with a HTTP 400 status code. e.g.

Content-Type: multipart/form-data;
Content-Disposition: form-data; name="contacts.csv"; filename="/C:/Example/contacts.csv"

Merge option

The mergeOption field allows you to specify how the import should handle empty fields, which is similar to the functionality described in this article.

Response

The id of the returned object can be used to query import progress.

The possible status types are:

  • 'Finished' - The import has been accepted and has successfully imported
  • 'NotFinished' - The import has been accepted, but has not yet finished.
  • 'RejectedByWatchdog' - The import was rejected by Watchdog due to concerns with the quality of your email data; please contact support
  • 'InvalidFileFormat' - The file imported was not in the advised CSV or Excel format
  • 'Unknown' - The import has an unknown state which could indicate an invalid import ID; please contact support
  • 'Failed' - The import has failed; please contact support
  • 'ExceedsAllowedContactLimit' - The contacts you're trying to import exceeds your account's contact limit
  • 'NotAvailableInThisVersion' - This feature is not available in the version of the API you're using
Language
Authentication
Basic
base64
:
URL
Click Try It! to start a request and see the response here!