Find Redirect

  • REST Method: GET
  • URL: https://docsapi.helpscout.net/v1/redirects

Use this endpoint to resolve the destination redirect URL from a particular URL path.

Using the Redirects API, it is possible create a chain of redirects such that one URL might result in a redirect to another URL, which can itself result in a further redirect. When such a chain of redirects exists, this endpoint will follow the chain from the initial URL through to the final destination URL.

Request

Name Type Required Default Options Notes
url String Yes     The URL path to redirect from; e.g. /old/path/1234
siteId String Yes     The id of the Docs Site to redirect from

Response

Response Name Type Notes
Header Status Int 200
Body redirectedUrl Object (see example below) The value of redirectedUrl will be null when there is no redirect for the given url and siteId.
{
    "redirectedUrl": {
        "type": "article",
        "redirect": "https://docs.helpscout.net/article/488-transfer-account#section-1",
        "slug": "transfer-account",
        "number": 488,
        "anchor": "section-1"
    }
}