{ "openapi" : "3.0.1", "info" : { "title" : "Hubdb", "version" : "v3", "x-hubspot-product-tier-requirements" : { "marketing" : "PROFESSIONAL", "cms" : "PROFESSIONAL" }, "x-hubspot-documentation-banner" : "NONE", "x-hubspot-api-use-case" : "Store inventory data in HubDB tables for both record keeping and generating dynamic pages for listing products on your website.", "x-hubspot-related-documentation" : [ { "name" : "HubDB Guide", "url" : "https://developers.hubspot.com/docs/guides/api/cms/hubdb" } ], "x-hubspot-introduction" : "Use the HubDB API to create and manage HubDB tables in the account, as well as import, retrieve, and manage individual table data." }, "servers" : [ { "url" : "https://api.hubapi.com" } ], "tags" : [ { "name" : "Tables" }, { "name" : "Rows" }, { "name" : "Rows Batch" } ], "paths" : { "/cms/v3/hubdb/tables/{tableIdOrName}/draft/export" : { "get" : { "tags" : [ "Tables" ], "summary" : "Export a draft table", "description" : "Exports the draft version of a table to CSV / EXCEL format.", "operationId" : "get-/cms/v3/hubdb/tables/{tableIdOrName}/draft/export_exportDraftTable", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table to export.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "format", "in" : "query", "description" : "The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/vnd.ms-excel" : { "schema" : { "type" : "string", "format" : "binary" } }, "text/csv" : { "schema" : { "type" : "string", "format" : "binary" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/draft" : { "get" : { "tags" : [ "Tables" ], "summary" : "Return all draft tables", "description" : "Returns the details for each draft table defined in the specified account, including column definitions.", "operationId" : "get-/cms/v3/hubdb/tables/draft_getAllDraftTables", "parameters" : [ { "name" : "sort", "in" : "query", "description" : "Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "after", "in" : "query", "description" : "The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string" } }, { "name" : "limit", "in" : "query", "description" : "The maximum number of results to return. Default is 1000.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32" } }, { "name" : "createdAt", "in" : "query", "description" : "Only return tables created at exactly the specified time.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time" } }, { "name" : "createdAfter", "in" : "query", "description" : "Only return tables created after the specified time.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time" } }, { "name" : "createdBefore", "in" : "query", "description" : "Only return tables created before the specified time.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time" } }, { "name" : "updatedAt", "in" : "query", "description" : "Only return tables last updated at exactly the specified time.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time" } }, { "name" : "updatedAfter", "in" : "query", "description" : "Only return tables last updated after the specified time.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time" } }, { "name" : "updatedBefore", "in" : "query", "description" : "Only return tables last updated before the specified time.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time" } }, { "name" : "contentType", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string" } }, { "name" : "archived", "in" : "query", "description" : "Specifies whether to return archived tables. Defaults to `false`.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CollectionResponseWithTotalHubDbTableV3ForwardPaging" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft" : { "get" : { "tags" : [ "Rows" ], "summary" : "Get rows from draft table", "description" : "Returns rows in the draft version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options.", "operationId" : "get-/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft_readDraftTableRows", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table to query.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "sort", "in" : "query", "description" : "Specifies the column names to sort the results by.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "after", "in" : "query", "description" : "The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string" } }, { "name" : "limit", "in" : "query", "description" : "The maximum number of results to return. Default is `1000`.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32" } }, { "name" : "properties", "in" : "query", "description" : "Specify the column names to get results containing only the required columns instead of all column details. If you want to include multiple columns in the result, use this query param as many times. ", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "offset", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32" } }, { "name" : "archived", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}" : { "get" : { "tags" : [ "Rows" ], "summary" : "Get a table row", "description" : "Get a single row by ID from the published version of a table.\n**Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access.", "operationId" : "get-/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}_getTableRow", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "rowId", "in" : "path", "description" : "The ID of the row", "required" : true, "style" : "simple", "explode" : false, "schema" : { "pattern" : "\\d+", "type" : "string" } }, { "name" : "archived", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableRowV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}/draft/clone" : { "post" : { "tags" : [ "Rows" ], "summary" : "Clone a row", "description" : "Clones a single row in the draft version of a table.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}/draft/clone_cloneDraftTableRow", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "rowId", "in" : "path", "description" : "The ID of the row", "required" : true, "style" : "simple", "explode" : false, "schema" : { "pattern" : "\\d+", "type" : "string" } }, { "name" : "name", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableRowV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/draft/reset" : { "post" : { "tags" : [ "Tables" ], "summary" : "Reset a draft table", "description" : "Replaces the data in the draft version of the table with values from the published version. Any unpublished changes in the draft will be lost after this call is made.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/draft/reset_resetDraftTable", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table to reset.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "includeForeignIds", "in" : "query", "description" : "Set this to `true` to populate foreign ID values in the response.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/export" : { "get" : { "tags" : [ "Tables" ], "summary" : "Export a published version of a table", "description" : "Exports the published version of a table in a specified format.", "operationId" : "get-/cms/v3/hubdb/tables/{tableIdOrName}/export_exportTable", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table to export.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "format", "in" : "query", "description" : "The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/vnd.ms-excel" : { "schema" : { "type" : "string", "format" : "binary" } }, "text/csv" : { "schema" : { "type" : "string", "format" : "binary" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/replace" : { "post" : { "tags" : [ "Rows Batch" ], "summary" : "Replace rows in batch in draft table", "description" : "Replaces multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PUT /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/replace_replaceDraftTableRows", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchInputHubDbTableRowV3BatchUpdateRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseHubDbTableRowV3" } } } }, "207" : { "description" : "multiple statuses", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseHubDbTableRowV3WithErrors" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/draft/clone" : { "post" : { "tags" : [ "Tables" ], "summary" : "Clone a table", "description" : "Clone an existing HubDB table. The `newName` and `newLabel` of the new table can be sent as JSON in the request body. This will create the cloned table as a draft.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/draft/clone_cloneDraftTable", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table to clone.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableCloneRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/purge" : { "post" : { "tags" : [ "Rows Batch" ], "summary" : "Permanently deletes rows", "description" : "Permanently deletes rows from the draft version of the table, given a set of row IDs. Maximum of 100 row IDs per call.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/purge_purgeDraftTableRows", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchInputString" } } }, "required" : true }, "responses" : { "204" : { "description" : "No content", "content" : { } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/draft/import" : { "post" : { "tags" : [ "Tables" ], "summary" : "Import data into draft table", "description" : "Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the draft version of the table. Use the `/publish` endpoint to push these changes to the published version.\nThis endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as `config`. The second part will be the CSV file you want to import and you can specify this with the name as `file`. Refer the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#importing-tables) to check the details and format of the JSON-formatted options for the import.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/draft/import_importDraftTable", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID of the destination table where data will be imported.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } ], "requestBody" : { "content" : { "multipart/form-data" : { "schema" : { "type" : "object", "properties" : { "config" : { "type" : "string" }, "file" : { "type" : "string", "format" : "binary" } } } } } }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/ImportResult" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}/draft" : { "get" : { "tags" : [ "Rows" ], "summary" : "Get a row from the draft table", "description" : "Get a single row by ID from a table's draft version.", "operationId" : "get-/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}/draft_getDraftTableRowById", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "rowId", "in" : "path", "description" : "The ID of the row", "required" : true, "style" : "simple", "explode" : false, "schema" : { "pattern" : "\\d+", "type" : "string" } }, { "name" : "archived", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableRowV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] }, "put" : { "tags" : [ "Rows" ], "summary" : "Replaces an existing row", "description" : "Replace a single row in the draft version of a table. All column values must be specified. If a column has a value in the target table and this request doesn't define that value, it will be deleted.\nSee the \"Create a row\" endpoint for instructions on how to format the JSON row definitions.", "operationId" : "put-/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}/draft_replaceDraftTableRow", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "rowId", "in" : "path", "description" : "The ID of the row", "required" : true, "style" : "simple", "explode" : false, "schema" : { "pattern" : "\\d+", "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableRowV3Request" } } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableRowV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] }, "delete" : { "tags" : [ "Rows" ], "summary" : "Permanently deletes a row", "description" : "Permanently deletes a row from a table's draft version.", "operationId" : "delete-/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}/draft_purgeDraftTableRow", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "rowId", "in" : "path", "description" : "The ID of the row", "required" : true, "style" : "simple", "explode" : false, "schema" : { "pattern" : "\\d+", "type" : "string" } } ], "responses" : { "204" : { "description" : "No content", "content" : { } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] }, "patch" : { "tags" : [ "Rows" ], "summary" : "Updates an existing row", "description" : "Sparse updates a single row in the table's draft version.\nAll the column values need not be specified. Only the columns or fields that needs to be modified can be specified.\nSee the \"Create a row\" endpoint for instructions on how to format the JSON row definitions.", "operationId" : "patch-/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}/draft_updateDraftTableRow", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "rowId", "in" : "path", "description" : "The ID of the row", "required" : true, "style" : "simple", "explode" : false, "schema" : { "pattern" : "\\d+", "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableRowV3Request" } } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableRowV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/rows" : { "get" : { "tags" : [ "Rows" ], "summary" : "Get rows for a table", "description" : "Returns a set of rows in the published version of the specified table. Row results can be filtered and sorted. Filtering and sorting options will be sent as query parameters to the API request. For example, by adding the query parameters `column1__gt=5&sort=-column1`, API returns the rows with values for column `column1` greater than 5 and in the descending order of `column1` values. Refer to the [overview section](https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows) for detailed filtering and sorting options.\n**Note:** This endpoint can be accessed without any authentication, if the table is set to be allowed for public access.", "operationId" : "get-/cms/v3/hubdb/tables/{tableIdOrName}/rows_getTableRows", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table to query.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "sort", "in" : "query", "description" : "Specifies the column names to sort the results by. See the above description for more details.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "after", "in" : "query", "description" : "The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string" } }, { "name" : "limit", "in" : "query", "description" : "The maximum number of results to return. Default is `1000`.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32" } }, { "name" : "properties", "in" : "query", "description" : "Specify the column names to get results containing only the required columns instead of all column details.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "offset", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32" } }, { "name" : "archived", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] }, "post" : { "tags" : [ "Rows" ], "summary" : "Add a new row to a table", "description" : "Add a new row to a HubDB table. New rows will be added to the draft version of the table. Use the `/publish` endpoint to push these changes to published version.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/rows_createTableRow", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the target table.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableRowV3Request" } } }, "required" : true }, "responses" : { "201" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableRowV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/rows/batch/read" : { "post" : { "tags" : [ "Rows Batch" ], "summary" : "Get a set of rows", "description" : "Returns rows in the published version of the specified table, given a set of row IDs.\n**Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/rows/batch/read_readTableRows", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table to query.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchInputString" } } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseHubDbTableRowV3" } } } }, "207" : { "description" : "multiple statuses", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseHubDbTableRowV3WithErrors" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/create" : { "post" : { "tags" : [ "Rows Batch" ], "summary" : "Create rows in batch", "description" : "Creates rows in the draft version of the specified table, given an array of row objects. Maximum of 100 row object per call. See the overview section for more details with an example.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/create_createDraftTableRows", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchInputHubDbTableRowV3Request" } } }, "required" : true }, "responses" : { "201" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseHubDbTableRowV3" } } } }, "207" : { "description" : "multiple statuses", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseHubDbTableRowV3WithErrors" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}" : { "get" : { "tags" : [ "Tables" ], "summary" : "Get details of a published table", "description" : "Returns the details for the published version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table.\n\n**Note:** This endpoint can be accessed without any authentication if the table is set to be allowed for public access. To do so, you'll need to include the HubSpot account ID in a `portalId` query parameter.", "operationId" : "get-/cms/v3/hubdb/tables/{tableIdOrName}_getTableDetails", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table to return.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "isGetLocalizedSchema", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } }, { "name" : "archived", "in" : "query", "description" : "Set this to `true` to return details for an archived table. Defaults to `false`.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } }, { "name" : "includeForeignIds", "in" : "query", "description" : "Set this to `true` to populate foreign ID values in the result.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] }, "delete" : { "tags" : [ "Tables" ], "summary" : "Archive a table", "description" : "Archive (soft delete) an existing HubDB table. This archives both the published and draft versions.", "operationId" : "delete-/cms/v3/hubdb/tables/{tableIdOrName}_archiveTable", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table to archive.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } ], "responses" : { "204" : { "description" : "No content", "content" : { } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/read" : { "post" : { "tags" : [ "Rows Batch" ], "summary" : "Get a set of rows from draft table", "description" : "Returns rows in the draft version of the specified table, given a set of row IDs.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/read_readDraftTableRows", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchInputString" } } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseHubDbTableRowV3" } } } }, "207" : { "description" : "multiple statuses", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseHubDbTableRowV3WithErrors" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/clone" : { "post" : { "tags" : [ "Rows Batch" ], "summary" : "Clone rows in batch", "description" : "Clones rows in the draft version of the specified table, given a set of row ids. Maximum of 100 row ids per call.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/clone_cloneDraftTableRows", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchInputHubDbTableRowBatchCloneRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseHubDbTableRowV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables" : { "get" : { "tags" : [ "Tables" ], "summary" : "Get all published tables", "description" : "Returns the details for the published version of each table defined in an account, including column definitions.", "operationId" : "get-/cms/v3/hubdb/tables_getAllTables", "parameters" : [ { "name" : "sort", "in" : "query", "description" : "Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "array", "items" : { "type" : "string" } } }, { "name" : "after", "in" : "query", "description" : "The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string" } }, { "name" : "limit", "in" : "query", "description" : "The maximum number of results to return. Default is 1000.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "integer", "format" : "int32" } }, { "name" : "createdAt", "in" : "query", "description" : "Only return tables created at exactly the specified time.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time" } }, { "name" : "createdAfter", "in" : "query", "description" : "Only return tables created after the specified time.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time" } }, { "name" : "createdBefore", "in" : "query", "description" : "Only return tables created before the specified time.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time" } }, { "name" : "updatedAt", "in" : "query", "description" : "Only return tables last updated at exactly the specified time.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time" } }, { "name" : "updatedAfter", "in" : "query", "description" : "Only return tables last updated after the specified time.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time" } }, { "name" : "updatedBefore", "in" : "query", "description" : "Only return tables last updated before the specified time.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string", "format" : "date-time" } }, { "name" : "contentType", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "string" } }, { "name" : "archived", "in" : "query", "description" : "Specifies whether to return archived tables. Defaults to `false`.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/CollectionResponseWithTotalHubDbTableV3ForwardPaging" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] }, "post" : { "tags" : [ "Tables" ], "summary" : "Create a new table", "description" : "Creates a new draft HubDB table given a JSON schema. The table name and label should be unique for each account.", "operationId" : "post-/cms/v3/hubdb/tables_createTable", "parameters" : [ ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableV3Request" } } }, "required" : true }, "responses" : { "201" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/unpublish" : { "post" : { "tags" : [ "Tables" ], "summary" : "Unpublish a table", "description" : "Unpublishes the table, meaning any website pages using data from the table will not render any data.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/unpublish_unpublishTable", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table to publish.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "includeForeignIds", "in" : "query", "description" : "Set this to `true` to populate foreign ID values in the response.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/draft" : { "get" : { "tags" : [ "Tables" ], "summary" : "Get details for a draft table", "description" : "Get the details for the draft version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table.", "operationId" : "get-/cms/v3/hubdb/tables/{tableIdOrName}/draft_getDraftTableDetailsById", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table to return.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "isGetLocalizedSchema", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } }, { "name" : "archived", "in" : "query", "description" : "Set this to `true` to return an archived table. Defaults to `false`.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } }, { "name" : "includeForeignIds", "in" : "query", "description" : "Set this to `true` to populate foreign ID values in the result.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] }, "patch" : { "tags" : [ "Tables" ], "summary" : "Update an existing table", "description" : "Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the draft verion of the table. Use the `/publish` endpoint to push all the changes to the published version. To restore a table, include the query parameter `archived=true` and `\"archived\": false` in the json body.\n**Note:** You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted.", "operationId" : "patch-/cms/v3/hubdb/tables/{tableIdOrName}/draft_updateDraftTable", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table to update.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "isGetLocalizedSchema", "in" : "query", "description" : "", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } }, { "name" : "archived", "in" : "query", "description" : "Specifies whether to return archived tables. Defaults to `false`.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } }, { "name" : "includeForeignIds", "in" : "query", "description" : "Set this to `true` to populate foreign ID values in the result.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableV3Request" } } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/draft/publish" : { "post" : { "tags" : [ "Tables" ], "summary" : "Publish a table from draft", "description" : "Publishes the table by copying the data and table schema changes from draft version to the published version, meaning any website pages using data from the table will be updated.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/draft/publish_publishDraftTable", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table to publish.", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } }, { "name" : "includeForeignIds", "in" : "query", "description" : "Set this to `true` to populate foreign ID values in the response.", "required" : false, "style" : "form", "explode" : true, "schema" : { "type" : "boolean" } } ], "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/HubDbTableV3" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } }, "/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/update" : { "post" : { "tags" : [ "Rows Batch" ], "summary" : "Update rows in batch in draft table", "description" : "Updates multiple rows as a batch in the draft version of the table, with a maximum of 100 rows per call. See the endpoint `PATCH /tables/{tableIdOrName}/rows/{rowId}/draft` for details on updating a single row.", "operationId" : "post-/cms/v3/hubdb/tables/{tableIdOrName}/rows/draft/batch/update_updateDraftTableRows", "parameters" : [ { "name" : "tableIdOrName", "in" : "path", "description" : "The ID or name of the table", "required" : true, "style" : "simple", "explode" : false, "schema" : { "type" : "string" } } ], "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchInputHubDbTableRowV3BatchUpdateRequest" } } }, "required" : true }, "responses" : { "200" : { "description" : "successful operation", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseHubDbTableRowV3" } } } }, "207" : { "description" : "multiple statuses", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/BatchResponseHubDbTableRowV3WithErrors" } } } }, "default" : { "$ref" : "#/components/responses/Error" } }, "security" : [ { "private_apps_legacy" : [ "hubdb" ] }, { "oauth2_legacy" : [ "hubdb" ] } ] } } }, "components" : { "schemas" : { "BatchInputString" : { "required" : [ "inputs" ], "type" : "object", "properties" : { "inputs" : { "type" : "array", "description" : "", "items" : { "type" : "string" } } } }, "StandardError" : { "required" : [ "category", "context", "errors", "links", "message", "status" ], "type" : "object", "properties" : { "subCategory" : { "type" : "object", "properties" : { }, "description" : "" }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } }, "description" : "" }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string" }, "description" : "" }, "id" : { "type" : "string", "description" : "" }, "category" : { "type" : "string", "description" : "" }, "message" : { "type" : "string", "description" : "" }, "errors" : { "type" : "array", "description" : "", "items" : { "$ref" : "#/components/schemas/ErrorDetail" } }, "status" : { "type" : "string", "description" : "" } } }, "BoundedNextPage" : { "required" : [ "offset" ], "type" : "object", "properties" : { "offset" : { "type" : "integer", "format" : "int32" }, "link" : { "type" : "string" } } }, "HubDbTableCloneRequest" : { "required" : [ "copyRows", "isHubspotDefined" ], "type" : "object", "properties" : { "newName" : { "type" : "string", "description" : "The new name for the cloned table", "example" : "test_table_new" }, "isHubspotDefined" : { "type" : "boolean" }, "newLabel" : { "type" : "string", "description" : "The new label for the cloned table", "example" : "Test Table New" }, "copyRows" : { "type" : "boolean", "description" : "Specifies whether to copy the rows during clone", "example" : true } } }, "SimpleUser" : { "required" : [ "email", "firstName", "id", "lastName" ], "type" : "object", "properties" : { "firstName" : { "type" : "string", "description" : "" }, "lastName" : { "type" : "string", "description" : "" }, "id" : { "type" : "string", "description" : "" }, "email" : { "type" : "string", "description" : "" } } }, "CollectionResponseWithTotalHubDbTableV3ForwardPaging" : { "required" : [ "results", "total" ], "type" : "object", "properties" : { "total" : { "type" : "integer", "description" : "", "format" : "int32" }, "paging" : { "$ref" : "#/components/schemas/ForwardPaging" }, "results" : { "type" : "array", "description" : "", "items" : { "$ref" : "#/components/schemas/HubDbTableV3" } } } }, "BoundedPaging" : { "type" : "object", "properties" : { "next" : { "$ref" : "#/components/schemas/BoundedNextPage" } } }, "BatchInputHubDbTableRowBatchCloneRequest" : { "required" : [ "inputs" ], "type" : "object", "properties" : { "inputs" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/HubDbTableRowBatchCloneRequest" } } } }, "BatchInputHubDbTableRowV3Request" : { "required" : [ "inputs" ], "type" : "object", "properties" : { "inputs" : { "type" : "array", "description" : "", "items" : { "$ref" : "#/components/schemas/HubDbTableRowV3Request" } } } }, "ErrorDetail" : { "required" : [ "message" ], "type" : "object", "properties" : { "subCategory" : { "type" : "string", "description" : "A specific category that contains more specific detail about the error" }, "code" : { "type" : "string", "description" : "The status code associated with the error detail" }, "in" : { "type" : "string", "description" : "The name of the field or parameter in which the error was found." }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } }, "description" : "Context about the error condition", "example" : { "missingScopes" : [ "scope1", "scope2" ] } }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate" } } }, "ForwardPaging" : { "type" : "object", "properties" : { "next" : { "$ref" : "#/components/schemas/NextPage" } } }, "HubDbTableRowBatchCloneRequest" : { "required" : [ "id" ], "type" : "object", "properties" : { "name" : { "type" : "string" }, "id" : { "type" : "string" } } }, "UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3" : { "properties" : { }, "oneOf" : [ { "$ref" : "#/components/schemas/RandomAccessCollectionResponseWithTotalHubDbTableRowV3" }, { "$ref" : "#/components/schemas/StreamingCollectionResponseWithTotalHubDbTableRowV3" } ] }, "Column" : { "required" : [ "label", "name", "type" ], "type" : "object", "properties" : { "createdByUserId" : { "type" : "integer", "format" : "int32" }, "foreignTableId" : { "type" : "integer", "description" : "Foreign table id referenced", "format" : "int64" }, "updatedBy" : { "$ref" : "#/components/schemas/SimpleUser" }, "description" : { "type" : "string" }, "label" : { "type" : "string", "description" : "Label of the column", "example" : "Text Column" }, "updatedByUserId" : { "type" : "integer", "format" : "int32" }, "type" : { "type" : "string", "description" : "Type of the column", "example" : "TEXT", "enum" : [ "NULL", "TEXT", "NUMBER", "URL", "IMAGE", "SELECT", "MULTISELECT", "BOOLEAN", "LOCATION", "DATE", "DATETIME", "CURRENCY", "RICHTEXT", "FOREIGN_ID", "VIDEO", "CTA", "FILE", "JSON", "COMPOSITE", "CODE" ] }, "optionCount" : { "type" : "integer", "description" : "Number of options available", "format" : "int32" }, "foreignIds" : { "type" : "array", "description" : "Foreign Ids", "items" : { "$ref" : "#/components/schemas/ForeignId" } }, "createdAt" : { "type" : "string", "format" : "date-time" }, "deleted" : { "type" : "boolean" }, "createdBy" : { "$ref" : "#/components/schemas/SimpleUser" }, "name" : { "type" : "string", "description" : "Name of the column", "example" : "text_column" }, "options" : { "type" : "array", "description" : "Options to choose for select and multi-select columns", "items" : { "$ref" : "#/components/schemas/Option" } }, "width" : { "type" : "integer", "description" : "Column width for HubDB UI", "format" : "int32" }, "id" : { "type" : "string", "description" : "Column Id", "example" : "1" }, "foreignIdsById" : { "type" : "object", "additionalProperties" : { "$ref" : "#/components/schemas/ForeignId" }, "description" : "Foreign ids" }, "foreignColumnId" : { "type" : "integer", "description" : "Foreign Column id", "format" : "int32" }, "foreignIdsByName" : { "type" : "object", "additionalProperties" : { "$ref" : "#/components/schemas/ForeignId" }, "description" : "Foreign ids by name" }, "updatedAt" : { "type" : "string", "format" : "date-time" } } }, "StreamingCollectionResponseWithTotalHubDbTableRowV3" : { "title" : "STREAMING", "required" : [ "results", "total", "type" ], "type" : "object", "properties" : { "total" : { "type" : "integer", "format" : "int32" }, "paging" : { "$ref" : "#/components/schemas/Paging" }, "type" : { "type" : "string", "default" : "STREAMING", "enum" : [ "STREAMING" ] }, "results" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/HubDbTableRowV3" } } } }, "HubDbTableV3" : { "required" : [ "label", "name" ], "type" : "object", "properties" : { "dynamicMetaTags" : { "type" : "object", "additionalProperties" : { "type" : "integer", "format" : "int32" }, "description" : "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.", "example" : { "DESCRIPTION" : 1, "FEATURED_IMAGE_URL" : 2, "LINK_REL_CANONICAL_URL" : 3 } }, "updatedBy" : { "$ref" : "#/components/schemas/SimpleUser" }, "allowPublicApiAccess" : { "type" : "boolean", "description" : "Specifies whether the table can be read by public without authorization", "example" : false }, "useForPages" : { "type" : "boolean", "description" : "Specifies whether the table can be used for creation of dynamic pages", "example" : true }, "publishedAt" : { "type" : "string", "description" : "Timestamp at which the table is published recently", "format" : "date-time", "example" : "2020-04-02T16:00:45.009+00:00" }, "columns" : { "type" : "array", "description" : "List of columns in the table", "example" : [ { "id" : "1", "name" : "text_column", "type" : "TEXT", "label" : "Text Column", "archived" : false, "foreignIdsById" : { }, "foreignIdsByName" : { } } ], "items" : { "$ref" : "#/components/schemas/Column" } }, "label" : { "type" : "string", "description" : "Label of the table", "example" : "Test Table" }, "published" : { "type" : "boolean" }, "columnCount" : { "type" : "integer", "description" : "Number of columns including deleted", "format" : "int32", "example" : 3 }, "allowChildTables" : { "type" : "boolean", "description" : "Specifies whether child tables can be created", "example" : true }, "createdAt" : { "type" : "string", "description" : "Timestamp at which the table is created", "format" : "date-time", "example" : "2019-03-15T21:20:51.556+00:00" }, "deleted" : { "type" : "boolean" }, "createdBy" : { "$ref" : "#/components/schemas/SimpleUser" }, "name" : { "type" : "string", "description" : "Name of the table", "example" : "test_table" }, "enableChildTablePages" : { "type" : "boolean", "description" : "Specifies creation of multi-level dynamic pages using child tables", "example" : false }, "id" : { "type" : "string", "description" : "Id of the table", "example" : "1630034" }, "rowCount" : { "type" : "integer", "description" : "Number of rows in the table", "format" : "int32", "example" : 0 }, "isOrderedManually" : { "type" : "boolean" }, "updatedAt" : { "type" : "string", "description" : "Timestamp at which the table is updated recently", "format" : "date-time", "example" : "2020-04-02T16:00:43.880+00:00" } } }, "BatchResponseHubDbTableRowV3" : { "type" : "object", "properties" : { "completedAt" : { "type" : "string", "format" : "date-time" }, "requestedAt" : { "type" : "string", "format" : "date-time" }, "startedAt" : { "type" : "string", "format" : "date-time" }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string" } }, "results" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/HubDbTableRowV3" } }, "status" : { "type" : "string", "enum" : [ "PENDING", "PROCESSING", "CANCELED", "COMPLETE" ] } } }, "ForeignId" : { "required" : [ "id", "name", "type" ], "type" : "object", "properties" : { "name" : { "type" : "string", "description" : "" }, "id" : { "type" : "string", "description" : "" }, "type" : { "type" : "string", "description" : "" } } }, "RandomAccessCollectionResponseWithTotalHubDbTableRowV3" : { "title" : "RANDOM_ACCESS", "required" : [ "results", "total", "type" ], "type" : "object", "properties" : { "total" : { "type" : "integer", "format" : "int32" }, "paging" : { "$ref" : "#/components/schemas/BoundedPaging" }, "type" : { "type" : "string", "default" : "RANDOM_ACCESS", "enum" : [ "RANDOM_ACCESS" ] }, "results" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/HubDbTableRowV3" } } } }, "ImportResult" : { "required" : [ "duplicateRows", "errors", "rowLimitExceeded", "rowsImported" ], "type" : "object", "properties" : { "rowLimitExceeded" : { "type" : "boolean", "description" : "Specifies whether row limit exceeded during import" }, "duplicateRows" : { "type" : "integer", "description" : "Specifies number of duplicate rows", "format" : "int32" }, "rowsImported" : { "type" : "integer", "description" : "Specifies number of rows imported", "format" : "int32" }, "errors" : { "type" : "array", "description" : "List of errors during import", "items" : { "$ref" : "#/components/schemas/Error" } } } }, "Paging" : { "type" : "object", "properties" : { "next" : { "$ref" : "#/components/schemas/NextPage" }, "prev" : { "$ref" : "#/components/schemas/PreviousPage" } } }, "HubDbTableV3Request" : { "required" : [ "label", "name" ], "type" : "object", "properties" : { "dynamicMetaTags" : { "type" : "object", "additionalProperties" : { "type" : "integer", "format" : "int32" }, "description" : "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.", "example" : { "DESCRIPTION" : 1, "FEATURED_IMAGE_URL" : 2, "LINK_REL_CANONICAL_URL" : 3 } }, "allowPublicApiAccess" : { "type" : "boolean", "description" : "Specifies whether the table can be read by public without authorization", "example" : false }, "useForPages" : { "type" : "boolean", "description" : "Specifies whether the table can be used for creation of dynamic pages", "example" : true }, "columns" : { "type" : "array", "description" : "List of columns in the table", "example" : [ { "id" : "1", "name" : "text_column", "type" : "TEXT", "label" : "Text Column" } ], "items" : { "$ref" : "#/components/schemas/ColumnRequest" } }, "name" : { "type" : "string", "description" : "Name of the table", "example" : "test_table" }, "enableChildTablePages" : { "type" : "boolean", "description" : "Specifies creation of multi-level dynamic pages using child tables", "example" : false }, "label" : { "type" : "string", "description" : "Label of the table", "example" : "Test Table" }, "allowChildTables" : { "type" : "boolean", "description" : "Specifies whether child tables can be created", "example" : true } } }, "Error" : { "required" : [ "category", "correlationId", "message" ], "type" : "object", "properties" : { "subCategory" : { "type" : "string", "description" : "A specific category that contains more specific detail about the error" }, "context" : { "type" : "object", "additionalProperties" : { "type" : "array", "items" : { "type" : "string" } }, "description" : "Context about the error condition", "example" : { "missingScopes" : [ "scope1", "scope2" ], "invalidPropertyName" : [ "propertyValue" ] } }, "correlationId" : { "type" : "string", "description" : "A unique identifier for the request. Include this value with any error reports or support tickets", "format" : "uuid", "example" : "aeb5f871-7f07-4993-9211-075dc63e7cbf" }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string" }, "description" : "A map of link names to associated URIs containing documentation about the error or recommended remediation steps", "example" : { "knowledge-base" : "https://www.hubspot.com/products/service/knowledge-base" } }, "message" : { "type" : "string", "description" : "A human readable message describing the error along with remediation steps where appropriate", "example" : "Invalid input (details will vary based on the error)" }, "category" : { "type" : "string", "description" : "The error category", "example" : "VALIDATION_ERROR" }, "errors" : { "type" : "array", "description" : "further information about the error", "items" : { "$ref" : "#/components/schemas/ErrorDetail" } } }, "example" : { "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" } } }, "BatchResponseHubDbTableRowV3WithErrors" : { "required" : [ "completedAt", "results", "startedAt", "status" ], "type" : "object", "properties" : { "completedAt" : { "type" : "string", "description" : "", "format" : "date-time" }, "numErrors" : { "type" : "integer", "description" : "", "format" : "int32" }, "requestedAt" : { "type" : "string", "description" : "", "format" : "date-time" }, "startedAt" : { "type" : "string", "description" : "", "format" : "date-time" }, "links" : { "type" : "object", "additionalProperties" : { "type" : "string" }, "description" : "" }, "results" : { "type" : "array", "description" : "", "items" : { "$ref" : "#/components/schemas/HubDbTableRowV3" } }, "errors" : { "type" : "array", "description" : "", "items" : { "$ref" : "#/components/schemas/StandardError" } }, "status" : { "type" : "string", "description" : "", "enum" : [ "PENDING", "PROCESSING", "CANCELED", "COMPLETE" ] } } }, "ColumnRequest" : { "required" : [ "id", "label", "name", "options", "type" ], "type" : "object", "properties" : { "foreignTableId" : { "type" : "integer", "description" : "The id of another table to which the column refers/points to.", "format" : "int64" }, "name" : { "type" : "string", "description" : "Name of the column", "example" : "text_column" }, "options" : { "type" : "array", "description" : "Options to choose for select and multi-select columns", "items" : { "$ref" : "#/components/schemas/Option" } }, "id" : { "type" : "integer", "description" : "Column Id", "format" : "int32", "example" : 1 }, "label" : { "type" : "string", "description" : "Label of the column", "example" : "Text Column" }, "type" : { "type" : "string", "description" : "Type of the column", "example" : "TEXT", "enum" : [ "NULL", "TEXT", "NUMBER", "URL", "IMAGE", "SELECT", "MULTISELECT", "BOOLEAN", "LOCATION", "DATE", "DATETIME", "CURRENCY", "RICHTEXT", "FOREIGN_ID", "VIDEO", "CTA", "FILE", "JSON", "COMPOSITE", "CODE" ] }, "foreignColumnId" : { "type" : "integer", "description" : "The id of the column from another table to which the column refers/points to.", "format" : "int32" } } }, "Variant" : { "type" : "object", "properties" : { } }, "HubDbTableRowV3BatchUpdateRequest" : { "required" : [ "id", "values" ], "type" : "object", "properties" : { "path" : { "type" : "string", "description" : "Specifies the value for `hs_path` column, which will be used as slug in the dynamic pages", "example" : "test_path" }, "childTableId" : { "type" : "integer", "description" : "Specifies the value for the column child table id", "format" : "int32", "example" : 1902373 }, "values" : { "type" : "object", "additionalProperties" : { "$ref" : "#/components/schemas/Variant" }, "description" : "List of key value pairs with the column name and column value", "example" : { "multiselect" : [ { "id" : "1", "name" : "Option 1", "type" : "option", "order" : 0 }, { "id" : "2", "name" : "Option 2", "type" : "option", "order" : 1 } ], "text_column" : "sample text value", "number_column" : 76 } }, "name" : { "type" : "string", "description" : "Specifies the value for `hs_name` column, which will be used as title in the dynamic pages", "example" : "test_title" }, "id" : { "type" : "string", "description" : "The id of the table row", "example" : "4099275931" }, "displayIndex" : { "type" : "integer", "format" : "int32" } } }, "PreviousPage" : { "required" : [ "before" ], "type" : "object", "properties" : { "before" : { "type" : "string" }, "link" : { "type" : "string" } } }, "HubDbTableRowV3" : { "required" : [ "values" ], "type" : "object", "properties" : { "path" : { "type" : "string", "description" : "Specifies the value for `hs_path` column, which will be used as slug in the dynamic pages", "example" : "test_path" }, "createdAt" : { "type" : "string", "description" : "Timestamp at which the row is created", "format" : "date-time", "example" : "2020-03-30T20:39:52.328+00:00" }, "childTableId" : { "type" : "string", "description" : "Specifies the value for the column child table id", "example" : "1902373" }, "publishedAt" : { "type" : "string", "format" : "date-time" }, "values" : { "type" : "object", "additionalProperties" : { "type" : "object", "properties" : { } }, "description" : "List of key value pairs with the column name and column value", "example" : { "multiselect" : [ { "id" : "1", "name" : "Option 1", "type" : "option", "order" : 0 }, { "id" : "2", "name" : "Option 2", "type" : "option", "order" : 1 } ], "text_column" : "sample text value", "number_column" : 76 } }, "name" : { "type" : "string", "description" : "Specifies the value for `hs_name` column, which will be used as title in the dynamic pages", "example" : "test_title" }, "id" : { "type" : "string", "description" : "The id of the table row", "example" : "4099275931" }, "updatedAt" : { "type" : "string", "description" : "Timestamp at which the row is updated last time", "format" : "date-time", "example" : "2020-03-30T20:39:52.328+00:00" } } }, "HubDbTableRowV3Request" : { "required" : [ "values" ], "type" : "object", "properties" : { "path" : { "type" : "string", "description" : "Specifies the value for `hs_path` column, which will be used as slug in the dynamic pages", "example" : "test_path" }, "childTableId" : { "type" : "integer", "description" : "Specifies the value for the column child table id", "format" : "int64", "example" : 1902373 }, "values" : { "type" : "object", "additionalProperties" : { "$ref" : "#/components/schemas/Variant" }, "description" : "List of key value pairs with the column name and column value", "example" : { "multiselect" : [ { "id" : "1", "name" : "Option 1", "type" : "option", "order" : 0 }, { "id" : "2", "name" : "Option 2", "type" : "option", "order" : 1 } ], "text_column" : "sample text value", "number_column" : 76 } }, "name" : { "type" : "string", "description" : "Specifies the value for `hs_name` column, which will be used as title in the dynamic pages", "example" : "test_title" }, "displayIndex" : { "type" : "integer", "format" : "int32" } } }, "Option" : { "required" : [ "createdAt", "id", "name", "order", "type", "updatedAt" ], "type" : "object", "properties" : { "createdByUserId" : { "type" : "integer", "format" : "int32" }, "createdAt" : { "type" : "string", "format" : "date-time" }, "updatedBy" : { "$ref" : "#/components/schemas/SimpleUser" }, "createdBy" : { "$ref" : "#/components/schemas/SimpleUser" }, "name" : { "type" : "string", "description" : "" }, "id" : { "type" : "string", "description" : "" }, "label" : { "type" : "string" }, "updatedByUserId" : { "type" : "integer", "format" : "int32" }, "type" : { "type" : "string", "description" : "" }, "order" : { "type" : "integer", "description" : "", "format" : "int32" }, "updatedAt" : { "type" : "string", "format" : "date-time" } } }, "NextPage" : { "required" : [ "after" ], "type" : "object", "properties" : { "link" : { "type" : "string", "description" : "" }, "after" : { "type" : "string", "description" : "" } } }, "BatchInputHubDbTableRowV3BatchUpdateRequest" : { "required" : [ "inputs" ], "type" : "object", "properties" : { "inputs" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/HubDbTableRowV3BatchUpdateRequest" } } } } }, "responses" : { "Error" : { "description" : "An error occurred.", "content" : { "*/*" : { "schema" : { "$ref" : "#/components/schemas/Error" } } } } }, "securitySchemes" : { "oauth2_legacy" : { "type" : "oauth2", "flows" : { "authorizationCode" : { "authorizationUrl" : "https://app.hubspot.com/oauth/authorize", "tokenUrl" : "https://api.hubapi.com/oauth/v1/token", "scopes" : { "hubdb" : "Read from and write to my HubDB" } } } }, "private_apps_legacy" : { "type" : "apiKey", "name" : "private-app-legacy", "in" : "header" } } }, "x-hubspot-available-client-libraries" : [ "PHP", "Node", "Ruby", "Python" ], "x-hubspot-product-tier-requirements" : { "marketing" : "PROFESSIONAL", "cms" : "PROFESSIONAL" }, "x-hubspot-documentation-banner" : "NONE" }