Imports

Bulk import CRM data

Imports are used to populate a HubSpot account with object (including contacts, companies, deals, and tickets) data that can be used with the sales, marketing, and service tools. Imports need a structured source file, such as an Excel or CSV (comma-separated value) document. A single structured file gives users the power to import tens of thousands of objects into their accounts at once.

Example use case: The import endpoints can be used to create objects in HubSpot from an Excel or CSV (comma-separated value) source file. There is a request value, fileFormat, that is used to identify the type of import file that will be provided. This fileFormat request value defaults to CSV. For Excel spreadsheets, use a value of SPREADSHEET.

          
Example POST URL:
https://api.hubapi.com/crm/v3/imports?

Example importRequest JSON data:
This example contains 3 columns:
 - First name, mapped to the firstname contact property
 - Email, mapped to the email contact property
 - Company ID, which contains a list of company record IDs
   that the contact will be assocated with.

{
  "name": "test_import",
  "files": [
    {
      "fileName": "final_emails.csv",
      "fileFormat": "CSV",
      "fileImportPage": {
        "hasHeader": true,
        "columnMappings": [
          {
            "ignored": false,
            "columnName": "First Name",
            "idColumnType": null,
            "propertyName": "firstname",
            "foreignKeyType": null,
            "columnObjectType": "CONTACT",
            "associationIdentifierColumn": false
          },
          {
            "ignored": false,
            "columnName": "Email",
            "idColumnType": "HUBSPOT_ALTERNATE_ID",
            "propertyName": "email",
            "foreignKeyType": null,
            "columnObjectType": "CONTACT",
            "associationIdentifierColumn": false
          },
          {
            "ignored": false,
            "columnName": "Company ID",
            "idColumnType": "HUBSPOT_OBJECT_ID",
            "propertyName": null,
            "columnObjectType": "COMPANY",
            "associationIdentifierColumn": false
          }
        ]
      }
    }
  ]
}