Tables

Import data into draft table

Changed on

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.

post/cms/hubdb/2026-03/tables/{tableIdOrName}/draft/import

Request

  • Base URL
    https://api.hubapi.com
  • URL
    https://api.hubapi.com/cms/hubdb/2026-03/tables/{tableIdOrName}/draft/import
  • Auth
    • OAuth 2
      Authorization code: https://app.hubspot.com/oauth/authorize
      Token URL: https://api.hubapi.com/oauth/v1/token scopes: hubdb
    • or OAuth 2
      Authorization code: https://app.hubspot.com/oauth/authorize
      Token URL: https://api.hubapi.com/oauth/v1/token scopes: hubdb.rows.write

Path parameters

tableIdOrNamestring required

The unique identifier or name of the HubDB table to import data into.

Request body multipart/form-data

configstring
filestring binary

Response

successful operation

duplicateRowsinteger required

Specifies number of duplicate rows

rowLimitExceededboolean required

Specifies whether row limit exceeded during import

rowsImportedinteger required

Specifies number of rows imported

Example response

{
  "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"
      }
    }
  ]
}

Changes

    • info

      the security scope hubdb was added to the endpoint's security scheme oauth2

    • info

      the security scope hubdb.rows.write was removed from the endpoint's security scheme oauth2

  • 2026-03f907bc4f599cRevision changes
    • info

      the security scope hubdb.rows.write was added to the endpoint's security scheme oauth2

    • info

      the security scope hubdb-data-write was removed from the endpoint's security scheme oauth2