GET
/
cms
/
v3
/
url-redirects
/
Get current redirects
curl --request GET \
  --url https://api.hubapi.com/cms/v3/url-redirects/ \
  --header 'Authorization: Bearer <token>'
{
  "total": 2,
  "results": [
    {
      "id": "3212223134",
      "createdAt": "2017-07-24T17:24:09.141Z",
      "updatedAt": "2017-07-24T17:24:09.141Z",
      "routePrefix": "http://test.hs-sites.com/(?P<page_slug>.*)",
      "destination": "http://www.example.online/{page_slug}",
      "redirectStyle": 301,
      "isOnlyAfterNotFound": true,
      "isMatchFullUrl": true,
      "isMatchQueryString": false,
      "isPattern": false,
      "isTrailingSlashOptional": true,
      "isProtocolAgnostic": true,
      "precedence": 3
    },
    {
      "id": "3212242073",
      "createdAt": "2017-07-25T15:42:06.410Z",
      "updatedAt": "2017-07-25T15:42:06.410Z",
      "routePrefix": "/mytest/(?P<page_slug>.*)",
      "destination": "/newtest/{page_slug}",
      "redirectStyle": 301,
      "isOnlyAfterNotFound": true,
      "isMatchFullUrl": true,
      "isMatchQueryString": false,
      "isPattern": false,
      "isTrailingSlashOptional": true,
      "isProtocolAgnostic": true,
      "precedence": 999999993
    }
  ],
  "paging": {
    "next": {
      "after": "Mg%3D%3D",
      "link": "https://api.hubspot.com/cms/v3/url-redirects?after=Mg%3D%3D"
    }
  }
}
Supported products
Requires one of the following products or higher.
Marketing HubMarketing HubProfessional
Sales HubSales HubFree
Service HubService HubFree
Content HubContent HubStarter

Required Scopes

This API requires one of the following scopes:
  • content

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Query Parameters

createdAt
string<date-time>

Only return redirects created on exactly this date.

createdAfter
string<date-time>

Only return redirects created after this date.

createdBefore
string<date-time>

Only return redirects created before this date.

updatedAt
string<date-time>

Only return redirects last updated on exactly this date.

updatedAfter
string<date-time>

Only return redirects last updated after this date.

updatedBefore
string<date-time>

Only return redirects last updated before this date.

sort
string[]
after
string

The paging cursor token of the last successfully read resource will be returned as the paging.next.after JSON property of a paged response containing more results.

limit
integer

Maximum number of result per page

archived
boolean

Whether to return only results that have been archived.

Response

200
application/json

successful operation

The response is of type object.