curl --request POST \
--url https://api.hubapi.com/cms/v3/hubdb/tables/{tableIdOrName}/draft/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'config=<string>' \
--form file='@example-file'{
"duplicateRows": 123,
"errors": [
{
"message": "Invalid input (details will vary based on the error)",
"correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
"category": "VALIDATION_ERROR",
"links": {
"knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
}
}
],
"rowLimitExceeded": true,
"rowsImported": 123
}Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the draft version of the table. Use the /publish endpoint to push these changes to the published version.
This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as config. The second part will be the CSV file you want to import and you can specify this with the name as file. Refer the overview section to check the details and format of the JSON-formatted options for the import.
curl --request POST \
--url https://api.hubapi.com/cms/v3/hubdb/tables/{tableIdOrName}/draft/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'config=<string>' \
--form file='@example-file'{
"duplicateRows": 123,
"errors": [
{
"message": "Invalid input (details will vary based on the error)",
"correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
"category": "VALIDATION_ERROR",
"links": {
"knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
}
}
],
"rowLimitExceeded": true,
"rowsImported": 123
}Supported products
Required Scopes
The access token received from the authorization server in the OAuth 2.0 flow.
The ID or name of the HubDB table.
successful operation
Was this page helpful?