Documentation Index
Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Scope requirements
Scope requirements
Retrieve redirects
You can retrieve URL redirects either individually by ID or by retrieving all redirects:- To retrieve all redirects, make a
GETrequest to/cms/url-redirects/2026-03. - To retrieve an individual redirect, make a
GETrequest to/cms/url-redirects/2026-03/{urlRedirectId}.
Retrieve all redirects
When retrieving all redirects, you can filter and sort the returned results using query parameters. For example, the following request would retrieve the first 10 redirects created after January 1, 2024:| Parameter | Type | Description |
|---|---|---|
after | String | The paging cursor token of the last successfully read resource. Available from paging.next.after in paginated responses. |
archived | Boolean | Whether to return only results that have been archived. |
createdAfter | String | Only return redirects created after this date (ISO 8601 format). |
createdAt | String | Only return redirects created on exactly this date (ISO 8601 format). |
createdBefore | String | Only return redirects created before this date (ISO 8601 format). |
limit | Integer | Maximum number of results per page. |
sort | Array | Specify the order in which the URL redirects are returned. |
updatedAfter | String | Only return redirects last updated after this date (ISO 8601 format). |
updatedAt | String | Only return redirects last updated on exactly this date (ISO 8601 format). |
updatedBefore | String | Only return redirects last updated before this date (ISO 8601 format). |
total count and an array of redirect objects:
Retrieve a single redirect
To retrieve details for a specific redirect, make aGET request to /cms/url-redirects/2026-03/{urlRedirectId}.
For example, the request below would retrieve the details for the redirect with ID 3212223134:
Create a redirect
To create a new URL redirect, make aPOST request to /cms/url-redirects/2026-03.
For example, the request below would create a permanent redirect from /old-page to /new-page:
| Parameter | Type | Description |
|---|---|---|
routePrefix | String | The target incoming URL, path, or pattern to match for redirection. |
destination | String | The location that the target URL should be redirected to if it matches the routePrefix. |
redirectStyle | Integer | The type of redirect to create. Options include: 301 (permanent), 302 (temporary), or 305 (proxy). |
isOnlyAfterNotFound | Boolean | Whether the URL redirect mapping should apply only if a live page on the URL isn’t found. If false, the URL redirect mapping will take precedence over any existing page. |
isMatchFullUrl | Boolean | Whether the routePrefix should match on the entire URL, including the domain. |
isMatchQueryString | Boolean | Whether the routePrefix should match on the entire URL path, including the query string. |
isPattern | Boolean | Whether the routePrefix should match based on pattern. |
isProtocolAgnostic | Boolean | Whether the routePrefix should match both HTTP and HTTPS protocols. |
isTrailingSlashOptional | Boolean | Whether a trailing slash will be ignored. |
precedence | Integer | Used to prioritize URL redirection. If a given URL matches more than one redirect, the one with the lower precedence will be used. |
Update a redirect
To update an existing URL redirect, make aPATCH request to /cms/url-redirects/2026-03/{urlRedirectId}.
For example, the request below would update the redirect with ID 3212223134 to change the destination URL:
| Parameter | Type | Description |
|---|---|---|
routePrefix | String | The target incoming URL, path, or pattern to match for redirection. |
destination | String | The location that the target URL should be redirected to if it matches the routePrefix. |
redirectStyle | Integer | The type of redirect to create. Options include: 301 (permanent), 302 (temporary), or 305 (proxy). |
isOnlyAfterNotFound | Boolean | Whether the URL redirect mapping should apply only if a live page on the URL isn’t found. If false, the URL redirect mapping will take precedence over any existing page. |
isMatchFullUrl | Boolean | Whether the routePrefix should match on the entire URL, including the domain. |
isMatchQueryString | Boolean | Whether the routePrefix should match on the entire URL path, including the query string. |
isPattern | Boolean | Whether the routePrefix should match based on pattern. |
isProtocolAgnostic | Boolean | Whether the routePrefix should match both HTTP and HTTPS protocols. |
isTrailingSlashOptional | Boolean | Whether a trailing slash will be ignored. |
precedence | Integer | Used to prioritize URL redirection. If a given URL matches more than one redirect, the one with the lower precedence will be used. |
Delete a redirect
To delete an existing URL redirect, make aDELETE request to /cms/url-redirects/2026-03/{urlRedirectId}.
For example, the request below would delete the redirect with ID 3212223134:
204 No Content response with no body.