HubSpot: Create a new table
HubSpot hubdb.createTable: arguments, response, policy and SDK examples.
← Hubdb operations · Get started
Operation hubspot.hubdb_create_table
Provider route: POST /cms/hubdb/2026-09/tables. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/hubspot with npm, or alter-sdk-hubspot with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { HubSpotIntegration } from "@alter-ai/hubspot";
async function execute(input: Parameters<HubSpotIntegration["hubdb"]["createTable"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new HubSpotIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.hubdb.createTable(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_hubspot import HubSpotIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = HubSpotIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.hubdb.create_table(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | Model | Required within parent | Expand Create a new table — request body — body |
Referenced models: Create a new table — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Clone a table — response body |
Referenced models: Clone a table — response body
Schemas
Section titled “Schemas”2 more schemas are linked from the tables above, on the schema pages.
Create a new table — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
allowChildTables | boolean | Required within parent | Specifies whether child tables can be created |
allowPublicApiAccess | boolean | Required within parent | Specifies whether the table can be read by public without authorization |
columns | array | Required within parent | List of columns in the table |
columns[] | Model | Each item | Expand Create a new table — request body — body columns item |
dynamicMetaTags | object | Required within parent | Specifies the key value pairs of the [metadata fields](https://developers.hubspot.com/docs/cms/guides/dynamic-pages/hubdb#dynamic-pages) with the associated column IDs. Additional keys: see wildcard field |
dynamicMetaTags.* | integer | Additional keys | Format: int32 |
enableChildTablePages | boolean | Required within parent | Specifies creation of multi-level dynamic pages using child tables |
label | string | Required within parent | Label of the table |
name | string | Required within parent | Name of the table |
useForPages | boolean | Required within parent | Specifies whether the table can be used for creation of dynamic pages |
Referenced models: Create a new table — request body — body columns item
Clone a table — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
allowChildTables | boolean | Required within parent | Specifies whether child tables can be created |
allowPublicApiAccess | boolean | Required within parent | Specifies whether the table can be read by public without authorization |
columnCount | JSON | Required within parent | |
columnCount (anyOf 1) | integer | Alternative | Number of columns including deleted Format: int64 |
columnCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
columns | array | Required within parent | List of columns in the table |
columns[] | Model | Each item | Expand Clone a table — response body — columns item |
createdAt | string | Required within parent | Timestamp at which the table is created Format: date-time |
createdBy | Model | Optional | Expand Clone a table — response body — created By |
deleted | boolean | Required within parent | Specifies whether the table is marked as deleted. |
deletedAt | string | Required within parent | The timestamp indicating when the table was deleted. Format: date-time |
dynamicMetaTags | object | Required within parent | Specifies the key value pairs of the [metadata fields](https://developers.hubspot.com/docs/cms/guides/dynamic-pages/hubdb#dynamic-pages) with the associated column IDs. Additional keys: see wildcard field |
dynamicMetaTags.* | JSON | Additional keys | |
dynamicMetaTags.* (anyOf 1) | integer | Alternative | Format: int32 |
dynamicMetaTags.* (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
enableChildTablePages | boolean | Required within parent | Specifies creation of multi-level dynamic pages using child tables |
id | string | Required within parent | Id of the table |
isOrderedManually | boolean | Optional | Indicates whether the table rows are ordered manually. |
label | string | Required within parent | Label of the table |
name | string | Required within parent | Name of the table |
published | boolean | Required within parent | Indicates whether the table is currently published. |
publishedAt | string | Required within parent | Timestamp at which the table is published recently Format: date-time |
rowCount | JSON | Required within parent | |
rowCount (anyOf 1) | integer | Alternative | Number of rows in the table Format: int32 |
rowCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
updatedAt | string | Required within parent | Timestamp at which the table is updated recently Format: date-time |
updatedBy | Model | Optional | Expand Clone a table — response body — created By |
useForPages | boolean | Required within parent | Specifies whether the table can be used for creation of dynamic pages |
Referenced models: Clone a table — response body — columns item, Clone a table — response body — created By
Create a new table — request body — body columns item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
foreignColumnId | integer | Optional | The id of the column from another table to which the column refers/points to. Format: int32 |
foreignTableId | integer | Optional | The id of another table to which the column refers/points to. Format: int64 |
id | integer | Required within parent | Column Id Format: int32 |
label | string | Required within parent | Label of the column |
maxNumberOfCharacters | integer | Optional | Defines the maximum number of characters allowed in the column. Format: int32 |
maxNumberOfOptions | integer | Optional | Specifies the maximum number of options that can be set for select and multi-select columns. Format: int32 |
name | string | Required within parent | Name of the column |
options | array | Required within parent | Options to choose for select and multi-select columns |
options[] | Model | Each item | Expand Create a new table — request body — body columns item options item |
type | string | Required within parent | Type of the column One of: BOOLEAN, CODE, COMPOSITE, CTA, CURRENCY, DATE, DATETIME, EMBED, FILE, FOREIGN_ID, HUBSPOT_VIDEO, IMAGE, JSON, LOCATION, MULTISELECT, NULL, NUMBER, RICHTEXT, SELECT, TEXT, URL, VIDEO |
Referenced models: Create a new table — request body — body columns item options item
Clone a table — response body — created By
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
email | string | Required within parent | The email address of the user. |
firstName | string | Required within parent | The first name of the user. |
id | string | Required within parent | The unique identifier for the user. |
lastName | string | Required within parent | The last name of the user. |
Create a new table — request body — body columns item options item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A HubSpot property option |
createdAt | string | Required within parent | The timestamp when the option was created, in ISO 8601 format. Format: date-time |
createdBy | Model | Optional | Expand Clone a table — response body — created By |
createdByUserId | integer | Optional | The ID of the user who created the option. Format: int32 |
id | string | Required within parent | The unique ID of the option. |
label | string | Required within parent | A user-friendly label that identifies the option. |
name | string | Required within parent | An internal name assigned to the option, distinct from the label. |
order | integer | Required within parent | The order in which the option appears, represented as an integer. Format: int32 |
type | string | Required within parent | Indicates the category or data type of the option (e.g., string, number). |
updatedAt | string | Required within parent | The timestamp when the option was last updated, in ISO 8601 format. Format: date-time |
updatedBy | Model | Optional | Expand Clone a table — response body — created By |
updatedByUserId | integer | Optional | The ID of the user who last updated the option. Format: int32 |
Referenced models: Clone a table — response body — created By
Clone a table — response body — columns item foreign Ids item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | string | Required within parent | Unique identifier for the foreign ID. |
name | string | Required within parent | Name of the foreign ID. |
type | string | Required within parent | Type of the foreign ID. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: hubspot.hubdb_create_table. Catalog operation: hubdb_create_table. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["hubdb.tables.write"]