Short answer
POST /crm/v3/imports is a multipart/form-data request with two fields: importRequest (JSON text) and files (the CSV or Excel file). The JSON lists each file, its format (CSV or SPREADSHEET), and a columnMappings array in the same order as the file's columns, each with the property's internal name. File requirements are the same as UI imports.
1. The request
POST https://api.hubapi.com/crm/v3/imports (multipart/form-data)
importRequest = {
"name": "Nightly company import",
"files": [{
"fileName": "companies.csv",
"fileFormat": "CSV",
"fileImportPage": {
"hasHeader": true,
"columnMappings": [
{ "columnObjectTypeId": "0-2", "columnName": "Domain", "propertyName": "domain" },
{ "columnObjectTypeId": "0-2", "columnName": "Name", "propertyName": "name" }
]
}
}]
}
files = @companies.csv
2. Mapping rules
- One mapping per column, in column order.
propertyNameis the internal name. See labels vs internal names.- Multi-file imports use a common column with
toColumnObjectTypeId.
3. Related
Import limits: HubSpot import limits. Finding what an import created: records from an import.