Skip to content

Create a redirect

Request

You can create a new URL redirect by making a POST request to https://api.intercom.io/help_center/help_centers/{help_center_id}/redirects.

Requires the read_write_help_center_redirects_scope OAuth scope. Set Intercom-Version: Preview.

Security
bearerAuth
Path
help_center_idstringrequired

The unique identifier for the help center.

Example:123
Headers
Intercom-Versionstring(intercom_version)

Intercom API version.
If you omit the header, the API uses the version set in your app package, and 1.0 if none is set.

Enum:"1.0""1.1""1.2""1.3""1.4""2.0""2.1""2.2""2.3""2.4"
Example:Preview
Bodyapplication/json
from_urlstringrequired

The source URL to redirect. Must be an absolute URL within the help center's URL space.

Example:"http://help-center.test/lovelyhelpcenter/old-page"
localestringrequired

The locale of the target translation (e.g. en, fr). For article targets this selects the ArticleContent variant.

Example:"en"
target_typestringrequired

The type of the redirect target. help_center targets the help center's home page.

Enum:"article""collection""help_center"
Example:"article"
target_idstring

The unique identifier of the target article, collection or help center. The target must be a member of the help center. Required unless target_type is help_center, where it defaults to the help center in the path and must match it if provided.

Example:"11"
curl -i -X POST \
  https://api.intercom.io/help_center/help_centers/123/redirects \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'Intercom-Version: Preview' \
  -d '{
    "from_url": "http://help-center.test/lovelyhelpcenter/old-page",
    "locale": "en",
    "target_type": "article",
    "target_id": "11"
  }'

Responses

redirect created

Bodyapplication/json
idstring

The unique identifier for the redirect.

Example:"26"
typestring

The type of the object - help_center_redirect.

Value:"help_center_redirect"
Example:"help_center_redirect"
from_urlstring

The source URL that is redirected. This is an absolute URL within the help center's URL space, or a relative path such as /old-page for some existing redirects.

Example:"http://help-center.test/lovelyhelpcenter/old-page"
localestring

The locale of the redirect's target. For article targets this is the bound translation's locale, which may differ from the requested locale if no translation exists in that locale.

Example:"en"
help_center_idstring

The unique identifier for the help center the redirect belongs to.

Example:"7"
target_typestring

The type of the redirect target. help_center targets the help center's home page.

Enum:"article""collection""help_center"
Example:"article"
target_idstring

The unique identifier of the target article, collection or help center. For article targets this is the Article ID.

Example:"11"
created_atinteger

The time the redirect was created as a UTC Unix timestamp.

Example:1781619405
updated_atinteger

The time the redirect was last updated as a UTC Unix timestamp.

Example:1781619405
Response
{ "id": "26", "type": "help_center_redirect", "from_url": "http://help-center.test/lovelyhelpcenter/old-page", "locale": "en", "help_center_id": "7", "target_type": "article", "target_id": "11", "created_at": 1781619405, "updated_at": 1781619405 }