Skip to content

HubSpot: Retrieve URL mapping

HubSpot urlMappings.getUrlMapping: arguments, response, policy and SDK examples.

← Url mappings operations · Get started

Operation hubspot.url_mappings_get_url_mapping

Provider route: GET /url-mappings/2026-09/url-mappings/{id}. 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["urlMappings"]["getUrlMapping"]>[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.urlMappings.getUrlMapping(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.url_mappings.get_url_mapping(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.idintegerRequired within parentFormat: int64
Pattern: \d+

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

FieldTypePresenceDescription and constraints
$ModelRootExpand Retrieve URL mapping — response body

Referenced models: Retrieve URL mapping — response body

Retrieve URL mapping — response body
FieldTypePresenceDescription and constraints
$objectRoot
cdnPurgeEmbargoTimeJSONRequired within parent
cdnPurgeEmbargoTime (anyOf 1)integerAlternativeA Unix timestamp in milliseconds indicating the embargo time for CDN purge related to the URL mapping.
Format: int64
cdnPurgeEmbargoTime (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
contentGroupIdJSONRequired within parent
contentGroupId (anyOf 1)integerAlternativeA 64-bit integer representing the content group associated with the URL mapping.
Format: int64
contentGroupId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
cosObjectTypestringRequired within parentA string representing the type of content object associated with the URL mapping. Valid values include various content types such as 'CONTENT', 'LAYOUT', 'FILE', etc.
Known values: ACCESS_GROUP_MEMBERSHIP, APP_PAGE, BLOCK, BLOG, BLOG_AUTHOR, BRAND_BUSINESS_UNIT, BRAND_SETTINGS, CONTACT_MEMBERSHIP, CONTENT, CONTENT_EMBED, CONTENT_FOLDER, CONTENT_GROUP, CRM_OBJECT, CRM_OBJECT_TYPE, CUSTOM_WIDGET, CUSTOMER_PORTAL, DATA_QUERY, DESIGN_FOLDER, DOMAIN, DOMAIN_SETTINGS, EMAIL_ADDRESS, EXTENSION_RESOURCE, FILE, FOLDER, FOLLOW_ME, FORM, GLOBAL_CONTENT, GLOBAL_STYLES_THEME, HUBDB_TABLE, HUBDB_TABLE_ROW, IMAGE, JS_PROJECT_COMPONENT, KNOWLEDGE_BASE, KNOWLEDGE_CATEGORY, KNOWLEDGE_CATEGORY_TRANSLATION, KNOWLEDGE_HOMEPAGE_CATEGORY, LAYOUT, LAYOUT_SECTION, LIST_MEMBERSHIP, MARKETPLACE_LISTING, PASSWORD_PROTECTED, PAYMENT, PERSONALIZATION_TOKEN, PLACEMENT, PROJECT, QUOTE_TEMPLATE, RAW_ASSET, REDIRECT_URL, SECTION, SERVERLESS_FUNCTION, SITE_MAP, SITE_MENU, SITE_SETTINGS, SUBSCRIPTIONS_SETTINGS, TAG, THEME, THEME_SETTINGS, UNRESTRICTED_ACCESS, URL_MAPPING, VIDEO_PLAYER, WIDGET, WORKFLOW
createdJSONRequired within parent
created (anyOf 1)integerAlternativeA Unix timestamp in milliseconds indicating when the URL mapping was created.
Format: int64
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
createdByIdJSONRequired within parent
createdById (anyOf 1)integerAlternativeThe identifier of the user who created the URL mapping.
Format: int32
createdById (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
deletedAtJSONRequired within parent
deletedAt (anyOf 1)integerAlternativeA Unix timestamp in milliseconds indicating when the URL mapping was deleted.
Format: int64
deletedAt (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
destinationstringRequired within parentThe destination URL to which the routePrefix is redirected.
idJSONRequired within parent
id (anyOf 1)integerAlternativeThe unique identifier for the URL mapping, represented as a 64-bit integer.
Format: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
internallyCreatedbooleanRequired within parentA boolean indicating if the URL mapping was created internally by the system.
isActivebooleanRequired within parentA boolean indicating if the URL mapping is currently active.
isMatchFullUrlbooleanRequired within parentA boolean indicating if the full URL should be matched.
isMatchQueryStringbooleanRequired within parentA boolean indicating if the query string should be matched.
isOnlyAfterNotFoundbooleanRequired within parentA boolean indicating if the mapping should only be applied after a 404 Not Found response.
isPatternbooleanRequired within parentA boolean indicating if the routePrefix is a pattern.
isProtocolAgnosticbooleanRequired within parentA boolean indicating if the mapping should ignore the URL protocol (http/https).
isRegexbooleanRequired within parentA boolean indicating if the routePrefix should be treated as a regular expression.
isTrailingSlashOptionalbooleanRequired within parentA boolean indicating if the trailing slash in the URL is optional.
labelstringRequired within parentA label for the URL mapping.
lastUsedAtJSONRequired within parent
lastUsedAt (anyOf 1)integerAlternativeA Unix timestamp in milliseconds indicating the last time the URL mapping was used.
Format: int64
lastUsedAt (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringRequired within parentThe name of the URL mapping.
notestringRequired within parentA string containing notes about the URL mapping.
portalIdJSONRequired within parent
portalId (anyOf 1)integerAlternativeThe identifier for the HubSpot portal associated with this URL mapping.
Format: int32
portalId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
precedenceJSONRequired within parent
precedence (anyOf 1)integerAlternativeAn integer representing the precedence of the URL mapping, used to determine order of evaluation.
Format: int32
precedence (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
redirectStyleJSONRequired within parent
redirectStyle (anyOf 1)integerAlternativeAn integer representing the style of redirection used.
Format: int32
redirectStyle (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
routePrefixstringRequired within parentThe prefix of the URL path that is being mapped.
updatedJSONRequired within parent
updated (anyOf 1)integerAlternativeA Unix timestamp in milliseconds indicating when the URL mapping was last updated.
Format: int64
updated (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
updatedByIdJSONRequired within parent
updatedById (anyOf 1)integerAlternativeThe identifier of the user who last updated the URL mapping.
Format: int32
updatedById (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

SDK function policy ID: hubspot.url_mappings_get_url_mapping. Catalog operation: url_mappings_get_url_mapping. 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: ["content"]

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.