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
Crea una nueva tabla de borrador de HubDB dado un esquema JSON. El nombre y la etiqueta de la tabla deben ser únicos para cada cuenta.
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
Autorizaciones
The access token received from the authorization server in the OAuth 2.0 flow.
Cuerpo
Especifica si se pueden crear tablas secundarias.
Especifica si la tabla puede ser leída por el público sin autorización
Lista de columnas en la tabla
Show child attributes
Show child attributes
Especifica los pares de valores clave de los campos de metadatos con los IDs de columna asociados.
Show child attributes
Show child attributes
Especifica la creación de páginas dinámicas multinivel utilizando tablas secundarias
Etiqueta de la tabla
Nombre de la tabla
Especifica si la tabla se puede utilizar para la creación de páginas dinámicas.
Respuesta
successful operation
Especifica si se pueden crear tablas secundarias.
Especifica si la tabla puede ser leída por el público sin autorización
Número de columnas incluyendo las eliminadas
Lista de columnas en la tabla
Show child attributes
Show child attributes
Marca de tiempo en la que se crea la tabla
Especifica si la tabla se marca como eliminada.
La marca de tiempo que indica cuándo se eliminó la tabla.
Especifica los pares de valores clave de los campos de metadatos con los IDs de columna asociados.
Show child attributes
Show child attributes
Especifica la creación de páginas dinámicas multinivel utilizando tablas secundarias
ID de la tabla
Etiqueta de la tabla
Nombre de la tabla
Indica si la tabla está publicada actualmente.
Marca de tiempo en la que la tabla se publicó recientemente.
Número de filas en la tabla
Marca de tiempo en la que la tabla se actualizó recientemente
Especifica si la tabla se puede utilizar para la creación de páginas dinámicas.
Show child attributes
Show child attributes
Indica si las filas de la tabla se ordenan manualmente.
Show child attributes
Show child attributes