curl --request POST \
--url https://api.hubapi.com/cms/hubdb/2026-03/tables \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowChildTables": true,
"allowPublicApiAccess": true,
"columns": [
{
"id": 123,
"label": "<string>",
"name": "<string>",
"options": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"order": 123,
"type": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdByUserId": 123,
"updatedByUserId": 123
}
],
"foreignColumnId": 123,
"foreignTableId": 123,
"maxNumberOfCharacters": 123,
"maxNumberOfOptions": 123
}
],
"dynamicMetaTags": {},
"enableChildTablePages": true,
"label": "<string>",
"name": "<string>",
"useForPages": true
}
'import requests
url = "https://api.hubapi.com/cms/hubdb/2026-03/tables"
payload = {
"allowChildTables": True,
"allowPublicApiAccess": True,
"columns": [
{
"id": 123,
"label": "<string>",
"name": "<string>",
"options": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"order": 123,
"type": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdByUserId": 123,
"updatedByUserId": 123
}
],
"foreignColumnId": 123,
"foreignTableId": 123,
"maxNumberOfCharacters": 123,
"maxNumberOfOptions": 123
}
],
"dynamicMetaTags": {},
"enableChildTablePages": True,
"label": "<string>",
"name": "<string>",
"useForPages": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
allowChildTables: true,
allowPublicApiAccess: true,
columns: [
{
id: 123,
label: '<string>',
name: '<string>',
options: [
{
createdAt: '2023-11-07T05:31:56Z',
id: '<string>',
label: '<string>',
name: '<string>',
order: 123,
type: '<string>',
updatedAt: '2023-11-07T05:31:56Z',
createdByUserId: 123,
updatedByUserId: 123
}
],
foreignColumnId: 123,
foreignTableId: 123,
maxNumberOfCharacters: 123,
maxNumberOfOptions: 123
}
],
dynamicMetaTags: {},
enableChildTablePages: true,
label: '<string>',
name: '<string>',
useForPages: true
})
};
fetch('https://api.hubapi.com/cms/hubdb/2026-03/tables', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hubapi.com/cms/hubdb/2026-03/tables",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'allowChildTables' => true,
'allowPublicApiAccess' => true,
'columns' => [
[
'id' => 123,
'label' => '<string>',
'name' => '<string>',
'options' => [
[
'createdAt' => '2023-11-07T05:31:56Z',
'id' => '<string>',
'label' => '<string>',
'name' => '<string>',
'order' => 123,
'type' => '<string>',
'updatedAt' => '2023-11-07T05:31:56Z',
'createdByUserId' => 123,
'updatedByUserId' => 123
]
],
'foreignColumnId' => 123,
'foreignTableId' => 123,
'maxNumberOfCharacters' => 123,
'maxNumberOfOptions' => 123
]
],
'dynamicMetaTags' => [
],
'enableChildTablePages' => true,
'label' => '<string>',
'name' => '<string>',
'useForPages' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/cms/hubdb/2026-03/tables"
payload := strings.NewReader("{\n \"allowChildTables\": true,\n \"allowPublicApiAccess\": true,\n \"columns\": [\n {\n \"id\": 123,\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"options\": [\n {\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"order\": 123,\n \"type\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"createdByUserId\": 123,\n \"updatedByUserId\": 123\n }\n ],\n \"foreignColumnId\": 123,\n \"foreignTableId\": 123,\n \"maxNumberOfCharacters\": 123,\n \"maxNumberOfOptions\": 123\n }\n ],\n \"dynamicMetaTags\": {},\n \"enableChildTablePages\": true,\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"useForPages\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hubapi.com/cms/hubdb/2026-03/tables")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowChildTables\": true,\n \"allowPublicApiAccess\": true,\n \"columns\": [\n {\n \"id\": 123,\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"options\": [\n {\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"order\": 123,\n \"type\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"createdByUserId\": 123,\n \"updatedByUserId\": 123\n }\n ],\n \"foreignColumnId\": 123,\n \"foreignTableId\": 123,\n \"maxNumberOfCharacters\": 123,\n \"maxNumberOfOptions\": 123\n }\n ],\n \"dynamicMetaTags\": {},\n \"enableChildTablePages\": true,\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"useForPages\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/cms/hubdb/2026-03/tables")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowChildTables\": true,\n \"allowPublicApiAccess\": true,\n \"columns\": [\n {\n \"id\": 123,\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"options\": [\n {\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"order\": 123,\n \"type\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"createdByUserId\": 123,\n \"updatedByUserId\": 123\n }\n ],\n \"foreignColumnId\": 123,\n \"foreignTableId\": 123,\n \"maxNumberOfCharacters\": 123,\n \"maxNumberOfOptions\": 123\n }\n ],\n \"dynamicMetaTags\": {},\n \"enableChildTablePages\": true,\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"useForPages\": true\n}"
response = http.request(request)
puts response.read_body{
"allowChildTables": true,
"allowPublicApiAccess": true,
"columnCount": 123,
"columns": [
{
"deleted": true,
"description": "<string>",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"createdByUserId": 123,
"foreignColumnId": 123,
"foreignIds": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"foreignIdsById": {},
"foreignIdsByName": {},
"foreignTableId": 123,
"optionCount": 123,
"options": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"order": 123,
"type": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"createdByUserId": 123,
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"updatedByUserId": 123
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"updatedByUserId": 123,
"width": 123
}
],
"createdAt": "2023-11-07T05:31:56Z",
"deleted": true,
"deletedAt": "2023-11-07T05:31:56Z",
"dynamicMetaTags": {},
"enableChildTablePages": true,
"id": "<string>",
"label": "<string>",
"name": "<string>",
"published": true,
"publishedAt": "2023-11-07T05:31:56Z",
"rowCount": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"useForPages": true,
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"isOrderedManually": true,
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
}
}{
"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"
}
}Create a table
Cria uma nova tabela de rascunho do HubDB com base em um esquema JSON. O nome e o rótulo da tabela devem ser exclusivos para cada conta.
curl --request POST \
--url https://api.hubapi.com/cms/hubdb/2026-03/tables \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowChildTables": true,
"allowPublicApiAccess": true,
"columns": [
{
"id": 123,
"label": "<string>",
"name": "<string>",
"options": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"order": 123,
"type": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdByUserId": 123,
"updatedByUserId": 123
}
],
"foreignColumnId": 123,
"foreignTableId": 123,
"maxNumberOfCharacters": 123,
"maxNumberOfOptions": 123
}
],
"dynamicMetaTags": {},
"enableChildTablePages": true,
"label": "<string>",
"name": "<string>",
"useForPages": true
}
'import requests
url = "https://api.hubapi.com/cms/hubdb/2026-03/tables"
payload = {
"allowChildTables": True,
"allowPublicApiAccess": True,
"columns": [
{
"id": 123,
"label": "<string>",
"name": "<string>",
"options": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"order": 123,
"type": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdByUserId": 123,
"updatedByUserId": 123
}
],
"foreignColumnId": 123,
"foreignTableId": 123,
"maxNumberOfCharacters": 123,
"maxNumberOfOptions": 123
}
],
"dynamicMetaTags": {},
"enableChildTablePages": True,
"label": "<string>",
"name": "<string>",
"useForPages": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
allowChildTables: true,
allowPublicApiAccess: true,
columns: [
{
id: 123,
label: '<string>',
name: '<string>',
options: [
{
createdAt: '2023-11-07T05:31:56Z',
id: '<string>',
label: '<string>',
name: '<string>',
order: 123,
type: '<string>',
updatedAt: '2023-11-07T05:31:56Z',
createdByUserId: 123,
updatedByUserId: 123
}
],
foreignColumnId: 123,
foreignTableId: 123,
maxNumberOfCharacters: 123,
maxNumberOfOptions: 123
}
],
dynamicMetaTags: {},
enableChildTablePages: true,
label: '<string>',
name: '<string>',
useForPages: true
})
};
fetch('https://api.hubapi.com/cms/hubdb/2026-03/tables', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hubapi.com/cms/hubdb/2026-03/tables",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'allowChildTables' => true,
'allowPublicApiAccess' => true,
'columns' => [
[
'id' => 123,
'label' => '<string>',
'name' => '<string>',
'options' => [
[
'createdAt' => '2023-11-07T05:31:56Z',
'id' => '<string>',
'label' => '<string>',
'name' => '<string>',
'order' => 123,
'type' => '<string>',
'updatedAt' => '2023-11-07T05:31:56Z',
'createdByUserId' => 123,
'updatedByUserId' => 123
]
],
'foreignColumnId' => 123,
'foreignTableId' => 123,
'maxNumberOfCharacters' => 123,
'maxNumberOfOptions' => 123
]
],
'dynamicMetaTags' => [
],
'enableChildTablePages' => true,
'label' => '<string>',
'name' => '<string>',
'useForPages' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/cms/hubdb/2026-03/tables"
payload := strings.NewReader("{\n \"allowChildTables\": true,\n \"allowPublicApiAccess\": true,\n \"columns\": [\n {\n \"id\": 123,\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"options\": [\n {\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"order\": 123,\n \"type\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"createdByUserId\": 123,\n \"updatedByUserId\": 123\n }\n ],\n \"foreignColumnId\": 123,\n \"foreignTableId\": 123,\n \"maxNumberOfCharacters\": 123,\n \"maxNumberOfOptions\": 123\n }\n ],\n \"dynamicMetaTags\": {},\n \"enableChildTablePages\": true,\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"useForPages\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hubapi.com/cms/hubdb/2026-03/tables")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allowChildTables\": true,\n \"allowPublicApiAccess\": true,\n \"columns\": [\n {\n \"id\": 123,\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"options\": [\n {\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"order\": 123,\n \"type\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"createdByUserId\": 123,\n \"updatedByUserId\": 123\n }\n ],\n \"foreignColumnId\": 123,\n \"foreignTableId\": 123,\n \"maxNumberOfCharacters\": 123,\n \"maxNumberOfOptions\": 123\n }\n ],\n \"dynamicMetaTags\": {},\n \"enableChildTablePages\": true,\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"useForPages\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/cms/hubdb/2026-03/tables")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allowChildTables\": true,\n \"allowPublicApiAccess\": true,\n \"columns\": [\n {\n \"id\": 123,\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"options\": [\n {\n \"createdAt\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"order\": 123,\n \"type\": \"<string>\",\n \"updatedAt\": \"2023-11-07T05:31:56Z\",\n \"createdByUserId\": 123,\n \"updatedByUserId\": 123\n }\n ],\n \"foreignColumnId\": 123,\n \"foreignTableId\": 123,\n \"maxNumberOfCharacters\": 123,\n \"maxNumberOfOptions\": 123\n }\n ],\n \"dynamicMetaTags\": {},\n \"enableChildTablePages\": true,\n \"label\": \"<string>\",\n \"name\": \"<string>\",\n \"useForPages\": true\n}"
response = http.request(request)
puts response.read_body{
"allowChildTables": true,
"allowPublicApiAccess": true,
"columnCount": 123,
"columns": [
{
"deleted": true,
"description": "<string>",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"createdByUserId": 123,
"foreignColumnId": 123,
"foreignIds": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"foreignIdsById": {},
"foreignIdsByName": {},
"foreignTableId": 123,
"optionCount": 123,
"options": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"order": 123,
"type": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"createdByUserId": 123,
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"updatedByUserId": 123
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"updatedByUserId": 123,
"width": 123
}
],
"createdAt": "2023-11-07T05:31:56Z",
"deleted": true,
"deletedAt": "2023-11-07T05:31:56Z",
"dynamicMetaTags": {},
"enableChildTablePages": true,
"id": "<string>",
"label": "<string>",
"name": "<string>",
"published": true,
"publishedAt": "2023-11-07T05:31:56Z",
"rowCount": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"useForPages": true,
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"isOrderedManually": true,
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
}
}{
"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"
}
}Supported products
Supported products
Required Scopes
Required Scopes
Autorizações
The access token received from the authorization server in the OAuth 2.0 flow.
Corpo
Especifica se as tabelas secundárias podem ser criadas
Especifica se a tabela pode ser lida pelo público sem autorização
Lista de colunas na tabela
Show child attributes
Show child attributes
Especifica os pares de valores-chave dos campos de metadados com os IDs de coluna associados.
Show child attributes
Show child attributes
Especifica a criação de páginas dinâmicas de vários níveis usando tabelas secundárias
Rótulo da tabela
Nome da tabela
Especifica se a tabela pode ser usada para criação de páginas dinâmicas
Resposta
successful operation
Especifica se as tabelas secundárias podem ser criadas
Especifica se a tabela pode ser lida pelo público sem autorização
Número de colunas, incluindo as excluídas
Lista de colunas na tabela
Show child attributes
Show child attributes
A data e hora em que a tabela foi criada
Especifica se a tabela está marcada como excluída.
A data e a hora que indica quando a tabela foi excluída.
Especifica os pares de valores-chave dos campos de metadados com os IDs de coluna associados.
Show child attributes
Show child attributes
Especifica a criação de páginas dinâmicas de vários níveis usando tabelas secundárias
ID da tabela
Rótulo da tabela
Nome da tabela
Indica se a tabela está atualmente publicada.
A data e hora em que a tabela foi publicada recentemente
Número de linhas na tabela
A data e hora em que a tabela foi atualizada recentemente
Especifica se a tabela pode ser usada para criação de páginas dinâmicas
Show child attributes
Show child attributes
Indica se as linhas da tabela estão ordenadas manualmente.
Show child attributes
Show child attributes