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.

Add a new row to a table

Last updated January 31, 2024

POST /hubdb/api/v2/tables/:tableId/rows

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.

Add a new row to a HubDB table.

New rows will be added to the draft table. Use the /publish  endpoint to push all changes live.

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.
Table ID :tableId
used in the URL
The ID of the table you want to add the row to.

Optional Parameters How to use Description
Path "path": "examplepath"
Used in the request
If the table is enabled for dynamic pages, this is the path suffix used for the page for this row. Lowercase characters only.
Page title "name": "Example title"
Used in the request
If the table is enabled for dynamic pages, this is the HTML title used for the page for this row.
Cell Value "values": [ {list of cell values} ]
Used in the request
A list of values for the cells in the row. Each entry requires a column id that you would get when pulling the the details for the table, and the value being set for that column. For example, when setting a field with id 2 and type TEXT to use the value 'test':
"2": "test"
See below for more details for the values used by specific column types.

Value types

Below you'll find details for the format of the data used for the different column types. Each Example assumes you're setting a field with the column id of '2'

Column Type Value type Example
TEXT A simple string "2": "Example Text"
RICHTEXT A string that supports HTML "2": "<p>This is some text.</p>"
NUMBER A number, supports decimal values "2": 7.1354
BOOLEAN 0 for false or 1 for true "2": 1
DATE A Unix formatted timestamp in milliseconds. Must be set to midnight UTC time for the specified date. For example, the value of 02 Jan 2017 is 1483315200000. "2": 1483315200000
DATETIME A Unix formatted timestamp in milliseconds. The example would be for 06 Jan 2017 05:00:00 UTC "2": 1483678800000
SELECT An object representing one of a set of options set in the column definition. The name and id of the value will correspond to the column settings.
"2": {
  "id": 4,
  "name": "d",
  "type": "option"
}
URL A string representing a URL "2" : "https://integrate.hubspot.com/"
LOCATION An object representing latitude and longitude coordinates.
"2": {
  "lat": 41.836826,
  "long": -88.461914,
  "type": "location"
}
IMAGE An object including a URL of an image.
"2": {
  "url": "http://domain.com/image.jpg",
  "type": "image"
}