HubSpot: Unpublish a table
HubSpot hubdb.unpublishTable: arguments, response, policy and SDK examples.
← Hubdb operations · Get started
Operation hubspot.hubdb_unpublish_table
Provider route: POST /cms/hubdb/2026-09/tables/{tableIdOrName}/unpublish. 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"]["unpublishTable"]>[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.unpublishTable(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.unpublish_table(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.tableIdOrName | string | Required within parent | |
query | object | Optional | Additional keys: not allowed |
query.includeForeignIds | boolean | Optional |
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”1 more schema is linked from the tables above, on the schema pages.
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
Clone a table — response body — columns item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
createdAt | string | Optional | The timestamp when the column was created. Format: date-time |
createdBy | Model | Optional | Expand Clone a table — response body — created By |
createdByUserId | JSON | Optional | |
createdByUserId (anyOf 1) | integer | Alternative | The ID of the user who created the column. Format: int32 |
createdByUserId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
deleted | boolean | Required within parent | Indicates whether the column has been deleted. |
description | string | Required within parent | The description of the column. |
foreignColumnId | JSON | Optional | |
foreignColumnId (anyOf 1) | integer | Alternative | Foreign Column id Format: int32 |
foreignColumnId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
foreignIds | array | Optional | Foreign Ids |
foreignIds[] | Model | Each item | Expand Clone a table — response body — columns item foreign Ids item |
foreignIdsById | object | Optional | Foreign ids Additional keys: see wildcard field |
foreignIdsById.* | Model | Additional keys | Expand Clone a table — response body — columns item foreign Ids item |
foreignIdsByName | object | Optional | Foreign ids by name Additional keys: see wildcard field |
foreignIdsByName.* | Model | Additional keys | Expand Clone a table — response body — columns item foreign Ids item |
foreignTableId | JSON | Optional | |
foreignTableId (anyOf 1) | integer | Alternative | Foreign table id referenced Format: int64 |
foreignTableId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
id | string | Required within parent | Column Id |
label | string | Required within parent | Label of the column |
name | string | Required within parent | Name of the column |
optionCount | JSON | Optional | |
optionCount (anyOf 1) | integer | Alternative | Number of options available Format: int32 |
optionCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
options | array | Optional | Options to choose for select and multi-select columns |
options[] | Model | Each item | Expand Clone a table — response body — columns item options item |
type | string | Required within parent | Type of the column Known values: BOOLEAN, CODE, COMPOSITE, CTA, CURRENCY, DATE, DATETIME, EMBED, FILE, FOREIGN_ID, HUBSPOT_VIDEO, IMAGE, JSON, LOCATION, MULTISELECT, NULL, NUMBER, RICHTEXT, SELECT, TEXT, URL, VIDEO |
updatedAt | string | Optional | The timestamp when the column was last updated. Format: date-time |
updatedBy | Model | Optional | Expand Clone a table — response body — created By |
updatedByUserId | JSON | Optional | |
updatedByUserId (anyOf 1) | integer | Alternative | The ID of the user who last updated the column. Format: int32 |
updatedByUserId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
width | JSON | Optional | |
width (anyOf 1) | integer | Alternative | Column width for HubDB UI Format: int32 |
width (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Clone a table — response body — columns item foreign Ids item, Clone a table — response body — columns item options item, Clone a table — response body — created By
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. |
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_unpublish_table. Catalog operation: hubdb_unpublish_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.publish"]