HubSpot: Update tag (Replace)
HubSpot objectTags.updateObjectTag: arguments, response, policy and SDK examples.
← Object tags operations · Get started
Operation hubspot.object_tags_update_object_tag
Provider route: PUT /crm/object-tags/2026-09/{objectTypeId}/{tagId}. 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["objectTags"]["updateObjectTag"]>[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.objectTags.updateObjectTag(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.object_tags.update_object_tag(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.objectTypeId | string | Required within parent | |
path.tagId | integer | Required within parent | Format: int64 |
body | Model | Required within parent | Expand Update tag (Replace) — request body — body |
Referenced models: Update tag (Replace) — 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 Create tag — response body |
Referenced models: Create tag — response body
Schemas
Section titled “Schemas”133 more schemas are linked from the tables above, on the schema pages.
Create tag — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
color | string | Required within parent | The color associated with the CRM object tag, represented as a string. |
createdAt | string | Required within parent | The date and time when the tag was created, in ISO 8601 format. Format: date-time |
createdBy | JSON | Optional | |
createdBy (anyOf 1) | integer | Alternative | An integer representing the ID of the user who created the tag. Format: int64 |
createdBy (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
description | string | Optional | A string providing a description of the CRM object tag. |
displayOrder | JSON | Required within parent | |
displayOrder (anyOf 1) | integer | Alternative | An integer indicating the display order of the tag. Format: int32 |
displayOrder (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
filterBranch | JSON | Required within parent | A complex object defining the filter branch associated with the tag, which can include various filter types and branches. |
filterBranch (anyOf 1) | Model | Alternative | Expand Create tag — response body — filterBranch / filterBranchType: OR |
filterBranch (anyOf 2) | Model | Alternative | Expand Create tag — response body — filterBranch / filterBranchType: AND |
filterBranch (anyOf 3) | Model | Alternative | Expand Create tag — response body — filterBranch / filterBranchType: NOT ALL |
filterBranch (anyOf 4) | Model | Alternative | Expand Create tag — response body — filterBranch / filterBranchType: NOT ANY |
filterBranch (anyOf 5) | Model | Alternative | Expand Create tag — response body — filterBranch / filterBranchType: RESTRICTED |
filterBranch (anyOf 6) | Model | Alternative | Expand Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED |
filterBranch (anyOf 7) | Model | Alternative | Expand Create tag — response body — filterBranch / filterBranchType: ASSOCIATION |
filterPipelineIds | array | Required within parent | An array of strings representing the pipeline IDs that this tag is associated with. |
filterPipelineIds[] | string | Each item | |
id | string | Required within parent | The unique identifier for the CRM object tag, represented as a string. |
lastModifiedBy | JSON | Optional | |
lastModifiedBy (anyOf 1) | integer | Alternative | An integer representing the ID of the user who last modified the tag. Format: int64 |
lastModifiedBy (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
name | string | Required within parent | The name of the CRM object tag, represented as a string. |
objectTypeId | string | Required within parent | The identifier for the type of object this tag is associated with, represented as a string. |
updatedAt | string | Required within parent | The date and time when the tag was last updated, in ISO 8601 format. Format: date-time |
Referenced models: Create tag — response body — filterBranch / filterBranchType: AND, Create tag — response body — filterBranch / filterBranchType: ASSOCIATION, Create tag — response body — filterBranch / filterBranchType: NOT ALL, Create tag — response body — filterBranch / filterBranchType: NOT ANY, Create tag — response body — filterBranch / filterBranchType: OR, Create tag — response body — filterBranch / filterBranchType: RESTRICTED, Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED
Update tag (Replace) — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
color | string | Required within parent | A string specifying the color associated with the CRM object tag. |
description | string | Optional | A string providing a description of the CRM object tag. |
filterBranch | JSON | Required within parent | An object that defines the filter branch for the CRM object tag. It can be one of several filter branch types, such as PublicOrFilterBranch or PublicAndFilterBranch. |
filterBranch (oneOf 1) | Model | Alternative | Expand Create tag — request body — body / filterBranch / filterBranchType: OR |
filterBranch (oneOf 2) | Model | Alternative | Expand Create tag — request body — body / filterBranch / filterBranchType: AND |
filterBranch (oneOf 3) | Model | Alternative | Expand Create tag — request body — body / filterBranch / filterBranchType: NOT ALL |
filterBranch (oneOf 4) | Model | Alternative | Expand Create tag — request body — body / filterBranch / filterBranchType: NOT ANY |
filterBranch (oneOf 5) | Model | Alternative | Expand Create tag — request body — body / filterBranch / filterBranchType: RESTRICTED |
filterBranch (oneOf 6) | Model | Alternative | Expand Create tag — request body — body / filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED |
filterBranch (oneOf 7) | Model | Alternative | Expand Create tag — request body — body / filterBranch / filterBranchType: ASSOCIATION |
filterPipelineIds | array | Required within parent | An array of strings representing the IDs of the pipelines to which the CRM object tag is applicable. |
filterPipelineIds[] | string | Each item | |
name | string | Required within parent | A string representing the name of the CRM object tag. |
Referenced models: Create tag — request body — body / filterBranch / filterBranchType: AND, Create tag — request body — body / filterBranch / filterBranchType: ASSOCIATION, Create tag — request body — body / filterBranch / filterBranchType: NOT ALL, Create tag — request body — body / filterBranch / filterBranchType: NOT ANY, Create tag — request body — body / filterBranch / filterBranchType: OR, Create tag — request body — body / filterBranch / filterBranchType: RESTRICTED, Create tag — request body — body / filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED
Create tag — response body — filterBranch / filterBranchType: OR filters item filter Type: ADS SEARCH
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The PublicAdsSearchFilter component is used to define filters for searching advertisements within the HubSpot API. It specifies the criteria for filtering ads based on various parameters such as filter type, entity type, search term type, and more. |
adNetwork | string | Required within parent | A string that specifies the ad network where the search is being conducted. |
entityType | string | Required within parent | A string that represents the type of entity being searched for in the ads. |
filterType | string | Required within parent | A string that specifies the type of filter being applied. The default value is 'ADS_SEARCH'. Known values: ADS_SEARCH Default: ADS_SEARCH |
operator | string | Required within parent | A string that defines the operation or condition applied to the search terms. |
searchTermType | string | Required within parent | A string that indicates the type of search term being used in the filter. |
searchTerms | array | Required within parent | An array of strings containing the search terms used to filter the ads. |
searchTerms[] | string | Each item |
Create tag — response body — filterBranch / filterBranchType: OR filters item filter Type: COMMUNICATION SUBSCRIPTION
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a filter for communication subscriptions in the HubSpot API, used to specify criteria for filtering communication subscriptions based on various parameters. |
acceptedOptStates | array | Required within parent | An array of strings representing the opt-in states that are accepted for the filter. |
acceptedOptStates[] | string | Each item | |
businessUnitId | string | Optional | A string representing the ID of the business unit associated with the subscription. |
channel | string | Required within parent | A string indicating the communication channel associated with the subscription. |
filterType | string | Required within parent | A string that specifies the type of filter. Default value is 'COMMUNICATION_SUBSCRIPTION'. Known values: COMMUNICATION_SUBSCRIPTION Default: COMMUNICATION_SUBSCRIPTION |
subscriptionIds | array | Required within parent | An array of strings representing the IDs of the subscriptions to be filtered. |
subscriptionIds[] | string | Each item | |
subscriptionType | string | Required within parent | A string indicating the type of subscription being filtered. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: hubspot.object_tags_update_object_tag. Catalog operation: object_tags_update_object_tag. 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: ["crm-pipelines-object-label-access"]