HubSpot: List URL mappings
HubSpot urlMappings.getUrlMappings: arguments, response, policy and SDK examples.
← Url mappings operations · Get started
Operation hubspot.url_mappings_get_url_mappings
Provider route: GET /url-mappings/2026-09/url-mappings. 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["urlMappings"]["getUrlMappings"]>[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.getUrlMappings(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.url_mappings.get_url_mappings(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
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 |
|---|---|---|---|
$ | array | Root | |
$[] | Model | Each item | Expand Retrieve URL mapping — response body |
Referenced models: Retrieve URL mapping — response body
Schemas
Section titled “Schemas”Retrieve URL mapping — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
cdnPurgeEmbargoTime | JSON | Required within parent | |
cdnPurgeEmbargoTime (anyOf 1) | integer | Alternative | A Unix timestamp in milliseconds indicating the embargo time for CDN purge related to the URL mapping. Format: int64 |
cdnPurgeEmbargoTime (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
contentGroupId | JSON | Required within parent | |
contentGroupId (anyOf 1) | integer | Alternative | A 64-bit integer representing the content group associated with the URL mapping. Format: int64 |
contentGroupId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
cosObjectType | string | Required within parent | A 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 |
created | JSON | Required within parent | |
created (anyOf 1) | integer | Alternative | A Unix timestamp in milliseconds indicating when the URL mapping was created. Format: int64 |
created (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
createdById | JSON | Required within parent | |
createdById (anyOf 1) | integer | Alternative | The identifier of the user who created the URL mapping. Format: int32 |
createdById (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
deletedAt | JSON | Required within parent | |
deletedAt (anyOf 1) | integer | Alternative | A Unix timestamp in milliseconds indicating when the URL mapping was deleted. Format: int64 |
deletedAt (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
destination | string | Required within parent | The destination URL to which the routePrefix is redirected. |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | The unique identifier for the URL mapping, represented as a 64-bit integer. Format: int64 |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
internallyCreated | boolean | Required within parent | A boolean indicating if the URL mapping was created internally by the system. |
isActive | boolean | Required within parent | A boolean indicating if the URL mapping is currently active. |
isMatchFullUrl | boolean | Required within parent | A boolean indicating if the full URL should be matched. |
isMatchQueryString | boolean | Required within parent | A boolean indicating if the query string should be matched. |
isOnlyAfterNotFound | boolean | Required within parent | A boolean indicating if the mapping should only be applied after a 404 Not Found response. |
isPattern | boolean | Required within parent | A boolean indicating if the routePrefix is a pattern. |
isProtocolAgnostic | boolean | Required within parent | A boolean indicating if the mapping should ignore the URL protocol (http/https). |
isRegex | boolean | Required within parent | A boolean indicating if the routePrefix should be treated as a regular expression. |
isTrailingSlashOptional | boolean | Required within parent | A boolean indicating if the trailing slash in the URL is optional. |
label | string | Required within parent | A label for the URL mapping. |
lastUsedAt | JSON | Required within parent | |
lastUsedAt (anyOf 1) | integer | Alternative | A Unix timestamp in milliseconds indicating the last time the URL mapping was used. Format: int64 |
lastUsedAt (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
name | string | Required within parent | The name of the URL mapping. |
note | string | Required within parent | A string containing notes about the URL mapping. |
portalId | JSON | Required within parent | |
portalId (anyOf 1) | integer | Alternative | The identifier for the HubSpot portal associated with this URL mapping. Format: int32 |
portalId (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
precedence | JSON | Required within parent | |
precedence (anyOf 1) | integer | Alternative | An integer representing the precedence of the URL mapping, used to determine order of evaluation. Format: int32 |
precedence (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
redirectStyle | JSON | Required within parent | |
redirectStyle (anyOf 1) | integer | Alternative | An integer representing the style of redirection used. Format: int32 |
redirectStyle (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
routePrefix | string | Required within parent | The prefix of the URL path that is being mapped. |
updated | JSON | Required within parent | |
updated (anyOf 1) | integer | Alternative | A Unix timestamp in milliseconds indicating when the URL mapping was last updated. Format: int64 |
updated (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
updatedById | JSON | Required within parent | |
updatedById (anyOf 1) | integer | Alternative | The identifier of the user who last updated the URL mapping. Format: int32 |
updatedById (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: hubspot.url_mappings_get_url_mappings. Catalog operation: url_mappings_get_url_mappings. 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"]