---
title: "Import data into draft table"
method: POST
path: "/cms/hubdb/2026-03/tables/{tableIdOrName}/draft/import"
tags: ["Tables"]
---

# Import data into draft table

`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: one of:
  - OAuth 2
    - Authorization code: `https://app.hubspot.com/oauth/authorize`
    - Token URL: `https://api.hubapi.com/oauth/v1/token` scopes: `hubdb`
  - OAuth 2
    - Authorization code: `https://app.hubspot.com/oauth/authorize`
    - Token URL: `https://api.hubapi.com/oauth/v1/token` scopes: `hubdb.rows.write`

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](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import.

## Path parameters

- `tableIdOrName` string, required

## Request body `multipart/form-data`

- object
  - `config` string
  - `file` string, binary

## Response `200`

successful operation

- ImportResult
  - `duplicateRows` integer, required: Specifies number of duplicate rows
  - `errors` Error[], required: List of errors during import
    - `category` string, required: The error category
    - `context` object: Context about the error condition
    - `correlationId` string, uuid, required: A unique identifier for the request. Include this value with any error reports or support tickets
    - `errors` ErrorDetail[]: further information about the error
      - `code` string: The status code associated with the error detail
      - `context` object: Context about the error condition
      - `in` string: The name of the field or parameter in which the error was found.
      - `message` string, required: A human readable message describing the error along with remediation steps where appropriate
      - `subCategory` string: A specific category that contains more specific detail about the error
    - `links` object: A map of link names to associated URIs containing documentation about the error or recommended remediation steps
    - `message` string, required: A human readable message describing the error along with remediation steps where appropriate
    - `subCategory` string: A specific category that contains more specific detail about the error
  - `rowLimitExceeded` boolean, required: Specifies whether row limit exceeded during import
  - `rowsImported` integer, required: Specifies number of rows imported

## Other responses

- `default`: An error occurred.

## Changes

- **2026-11-02** (2026-03) `57dfaa14c811`: 2 info
  - the security scope `hubdb` was added to the endpoint's security scheme `oauth2`
  - the security scope `hubdb.rows.write` was removed from the endpoint's security scheme `oauth2`
- **2026-09-10** (2026-03) `f907bc4f599c`: 2 info
  - the security scope `hubdb.rows.write` was added to the endpoint's security scheme `oauth2`
  - the security scope `hubdb-data-write` was removed from the endpoint's security scheme `oauth2`
- **2026-09-09** (2026-03) `aae1075c6909`: 2 info
  - the security scope `hubdb-data-append` was added to the endpoint's security scheme `oauth2`
  - the security scope `hubdb.rows.write` was removed from the endpoint's security scheme `oauth2`
- **2026-09-07** (2026-03) `531201597da3`: 2 info
  - the security scope `hubdb` was added to the endpoint's security scheme `oauth2`
  - the security scope `hubdb.rows.write` was removed from the endpoint's security scheme `oauth2`
- **2026-09-04** (2026-03) `6b6a597c6598`: 2 info
  - the security scope `hubdb` was added to the endpoint's security scheme `oauth2`
  - the security scope `hubdb.rows.write` was removed from the endpoint's security scheme `oauth2`

[Operation history](https://skmtc.dev/hubspot/apis/cms-hubdb/changes/cms/hubdb/2026-03/tables/:tableIdOrName/draft/import/post.md)

---

[API](https://skmtc.dev/hubspot/apis/cms-hubdb.md) - [All operations](https://skmtc.dev/hubspot/apis/cms-hubdb/llms.txt) - [OpenAPI document](https://skmtc.dev/hubspot/apis/cms-hubdb/revisions/57dfaa14c811?raw)
