Import Contacts/Users

POST https://api.hubapi.com/crm/v3/imports

Import Data via POST

This endpoint allows you to initiate a data import process by sending a POST request to the specified URL.

Request Body

  • importRequest (text): A description of the import request.

  • files (file): The file to be imported.

Note: This file can be found here.

Response

Upon successful execution, the response will include a status code of 200 and a JSON object with detailed information about the import process, including the state, import request details, file imports, metadata, and other relevant attributes.

Request Body

[{"name"=>"importRequest", "value"=>"{\"name\":\"AWS-Recommendation-users-import\",\"importOperations\":{\"0-1\":\"UPSERT\"},\"files\":[{\"fileName\":\"users with email.csv\",\"fileFormat\":\"CSV\",\"fileImportPage\":{\"hasHeader\":true,\"columnMappings\":[{\"columnObjectTypeId\":\"0-1\",\"columnName\":\"USER_ID\",\"propertyName\":\"external_id\"},{\"columnObjectTypeId\":\"0-1\",\"columnName\":\"AGE\",\"propertyName\":\"age\"},{\"columnObjectTypeId\":\"0-1\",\"columnName\":\"GENDER\",\"propertyName\":\"gender\"},{\"columnObjectTypeId\":\"0-1\",\"columnName\":\"FIRSTNAME\",\"propertyName\":\"firstname\"},{\"columnObjectTypeId\":\"0-1\",\"columnName\":\"LASTNAME\",\"propertyName\":\"lastname\"},{\"columnObjectTypeId\":\"0-1\",\"columnName\":\"EMAIL\",\"propertyName\":\"email\",\"columnType\":\"HUBSPOT_ALTERNATE_ID\"}]}}]}", "datatype"=>"string"}, {"name"=>"files", "value"=>nil, "datatype"=>"null"}]

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring