Create a new Table

POST /hubdb/api/v1/tables

Method Details

HTTP Methods:

POST

Content Type:

application/json

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing

Create a new HubDB table.
Required Parameters How to use Description
OAuth Access Token or API Key Authorization: Bearer {token} header
or hapikey={key} query parameter.
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"}