There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

Create a new Table

Last updated January 31, 2024

POST /hubdb/api/v2/tables

Please note: as of January 31, 2024, the HubDB v2 API has been sunsetted. The associated endpoints will not be fully turned off until a future date in 2024, but if you're using this API, please migrate to the HubDB v3 API, which includes many performance, usability, and API consistency improvements over the previous two versions. Learn more about this sunset on the HubSpot Developer Changelog.

Create a new HubDB table.
Required Parameters How to use Description
OAuth access token or private app access token Authorization: Bearer {token} header Used to authenticate the request. Please see this page for more details about authentication.
Name "name":{name}
Used in the request
The name of the table.

Optional Parameters How to use Description
Use for dynamic pages "useForPages": false
Used in the request
Set this to true to use the page for dynamic pages.
Columns "columns":[ {list of columns} ]
Used in the request
A list of column definitions that will be used for the table.
Published at "publishedAt":{millisecond timestamp}
Used in the request
Set this to the current time to publish the table, making it available for use.

Columns

Each column should include the following fields.

Field How to use Description
Name "name":{name} The internal name of the column.
Label "label":{label} Optional - The label for the column. This will be displayed when editing the table in the HubSpot app.
Type "type":{type} The data type of the column. must be one of
  • TEXT - a simple text field
  • RICHTEXT - a text field that supports basic HTML
  • NUMBER - a number field
  • BOOLEAN - represented as a checkbox in HubSpot, uses 0 for unchecked and 1 for checked.
  • DATE - Stores a specific date as a millisecond timestamp set to midnight UTC for the specified date.
  • DATETIME - Stores a date and a time as a millisecond timestamp.
  • SELECT - The column can only be set to one of a set of options.
  • MULTISELECT - The column can be set to one or more of a set of options.
  • URL - Stores a URL.
  • LOCATION - Stores a lattitude and longitude location.
  • IMAGE - Stores the URL of an image.
Options "options": [ {list of options} ] If the column is the SELECT type, this will be used as the options for the column. Each option must include a name, and a type of "option":
[{"name":"a", "type":"option"}, {"name":"b", "type":"option"}