Skip to content

HubSpot: Retrieve Tag

HubSpot objectTags.getObjectTag: arguments, response, policy and SDK examples.

← Object tags operations · Get started

Operation hubspot.object_tags_get_object_tag

Provider route: GET /crm/object-tags/2026-09/{objectTypeId}/{tagId}. Alter supplies the connection’s credentials and routing.

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"]["getObjectTag"]>[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.getObjectTag(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from 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.get_object_tag(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.objectTypeIdstringRequired within parent
path.tagIdintegerRequired within parentFormat: int64

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Create tag — response body

Referenced models: Create tag — response body

66 more schemas are linked from the tables above, on the schema pages.

Create tag — response body
FieldTypePresenceDescription and constraints
$objectRoot
colorstringRequired within parentThe color associated with the CRM object tag, represented as a string.
createdAtstringRequired within parentThe date and time when the tag was created, in ISO 8601 format.
Format: date-time
createdByJSONOptional
createdBy (anyOf 1)integerAlternativeAn integer representing the ID of the user who created the tag.
Format: int64
createdBy (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
descriptionstringOptionalA string providing a description of the CRM object tag.
displayOrderJSONRequired within parent
displayOrder (anyOf 1)integerAlternativeAn integer indicating the display order of the tag.
Format: int32
displayOrder (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
filterBranchJSONRequired within parentA complex object defining the filter branch associated with the tag, which can include various filter types and branches.
filterBranch (anyOf 1)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: OR
filterBranch (anyOf 2)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: AND
filterBranch (anyOf 3)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: NOT ALL
filterBranch (anyOf 4)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: NOT ANY
filterBranch (anyOf 5)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: RESTRICTED
filterBranch (anyOf 6)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED
filterBranch (anyOf 7)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: ASSOCIATION
filterPipelineIdsarrayRequired within parentAn array of strings representing the pipeline IDs that this tag is associated with.
filterPipelineIds[]stringEach item
idstringRequired within parentThe unique identifier for the CRM object tag, represented as a string.
lastModifiedByJSONOptional
lastModifiedBy (anyOf 1)integerAlternativeAn integer representing the ID of the user who last modified the tag.
Format: int64
lastModifiedBy (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringRequired within parentThe name of the CRM object tag, represented as a string.
objectTypeIdstringRequired within parentThe identifier for the type of object this tag is associated with, represented as a string.
updatedAtstringRequired within parentThe 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

Create tag — response body — filterBranch / filterBranchType: OR filters item filter Type: ADS SEARCH
FieldTypePresenceDescription and constraints
$objectRoot
adNetworkstringRequired within parentA string that specifies the ad network where the search is being conducted.
entityTypestringRequired within parentA string that represents the type of entity being searched for in the ads.
filterTypestringRequired within parentA string that specifies the type of filter being applied. The default value is 'ADS_SEARCH'.
Known values: ADS_SEARCH
Default: ADS_SEARCH
operatorstringRequired within parentA string that defines the operation or condition applied to the search terms.
searchTermTypestringRequired within parentA string that indicates the type of search term being used in the filter.
searchTermsarrayRequired within parentAn array of strings containing the search terms used to filter the ads.
searchTerms[]stringEach item
Create tag — response body — filterBranch / filterBranchType: OR filters item filter Type: ADS TIME
FieldTypePresenceDescription and constraints
$objectRoot
filterTypestringRequired within parentA string that specifies the type of filter being applied. The default value is 'ADS_TIME'.
Known values: ADS_TIME
Default: ADS_TIME
pruningRefineByJSONRequired within parentAn object that defines the criteria for refining the pruning of the filter. It can be one of several types, such as PublicNumOccurrencesRefineBy, PublicSetOccurrencesRefineBy, or various timestamp refine types.
pruningRefineBy (anyOf 1)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: NUM OCCURRENCES
pruningRefineBy (anyOf 2)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: SET OCCURRENCES
pruningRefineBy (anyOf 3)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: RELATIVE COMPARATIVE
pruningRefineBy (anyOf 4)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: RELATIVE RANGED
pruningRefineBy (anyOf 5)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: ABSOLUTE COMPARATIVE
pruningRefineBy (anyOf 6)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: ABSOLUTE RANGED
pruningRefineBy (anyOf 7)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: ALL HISTORY
pruningRefineBy (anyOf 8)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By operation Type: TIME POINT
pruningRefineBy (anyOf 9)ModelAlternativeExpand Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: TIME RANGED

Referenced models: Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: ABSOLUTE COMPARATIVE, Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: ABSOLUTE RANGED, Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: ALL HISTORY, Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: NUM OCCURRENCES, Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: TIME RANGED, Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: RELATIVE COMPARATIVE, Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: RELATIVE RANGED, Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By type: SET OCCURRENCES, Create tag — response body — filterBranch / filterBranchType: UNIFIED EVENTS, operator: HAS COMPLETED, HAS NOT COMPLETED pruning Refine By operation Type: TIME POINT

SDK function policy ID: hubspot.object_tags_get_object_tag. Catalog operation: object_tags_get_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"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.