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.
By default, it's equal to the version set in the app package.

Default:"Preview"
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.

Enum:"article""collection"
Example:"article"
target_idstringrequired

The unique identifier of the target article or collection. The target must be a member of the help center.

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. An absolute URL within the help center's URL space.

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.

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

The unique identifier of the target article or collection. 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 }