POST/help_center/help_centers/{help_center_id}/redirects

Create a help center redirect

Creates a redirect in a help center, mapping a source URL to an article or collection. Supply from_url, locale, target_type, and target_id; the source URL must be absolute and within the help center's URL space, and the target must belong to that help center. Use the read_write_help_center_redirects_scope OAuth scope to create redirects.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters · 4 body fields
help_center_idstringrequired
The unique identifier of the help center where you want to create the redirect.
Intercom-Versionstringoptional
The Intercom API version to use. Defaults to 2.17 when omitted; listed supported values include 1.0 through 1.4 and 2.0 through 2.6.
Allowed:1.01.11.21.31.42.02.12.22.32.42.52.6Default:2.17

Redirect details. Supply from_url, locale, target_type, and target_id.

from_urlstringrequired
The source URL to redirect. Must be an absolute URL within the help center's URL space.
localestringrequired
The locale of the target translation (e.g. `en`, `fr`). For article targets this selects the ArticleContent variant.
target_typestringrequired
The type of the redirect target.
Allowed:articlecollection
target_idstringrequired
The unique identifier of the target article or collection. The target must be a member of the help center.

6 status codes
200Returns the created redirect, including its identifier, source URL, locale, target details, help center identifier, and creation and update timestamps.
idstringoptional
The unique identifier for the redirect.
typestringoptional
The type of the object - `help_center_redirect`.
Allowed:help_center_redirect
from_urlstringoptional
The source URL that is redirected. An absolute URL within the help center's URL space.
localestringoptional
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.
help_center_idstringoptional
The unique identifier for the help center the redirect belongs to.
target_typestringoptional
The type of the redirect target.
Allowed:articlecollection
target_idstringoptional
The unique identifier of the target article or collection. For article targets this is the Article ID.
created_atintegeroptional
The time the redirect was created as a UTC Unix timestamp.
updated_atintegeroptional
The time the redirect was last updated as a UTC Unix timestamp.
400Returned when the request is invalid, such as when a required field is missing or a field value is malformed.

2 documented failures

  • parameter_not_found

    from_url is required

  • parameter_invalid

    target_type must be 'article' or 'collection'

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects
401Returned when the request is unauthorized.

One documented failure

  • unauthorized

    Access Token Invalid

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects
404Returned when the help center is not found.

One documented failure

  • not_found

    Resource not found

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects
409Returned when the request conflicts with an existing resource.

One documented failure

  • resource_conflict

    A redirect with that URL already exists

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects
422Returned when the request is unprocessable.

One documented failure

  • data_invalid

    from_url must be an absolute URL within this help center's URL space

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects

Error handling

A 400 is returned when a required field is missing or a value is invalid; target_type must be article or collection, and from_url must be an absolute URL within the help center's URL space. A 401 indicates missing or invalid authorization, a 404 indicates the help center was not found, and a 409 indicates a conflict creating the redirect. A 422 is returned when the redirect details cannot be processed; the target identified by target_id must belong to the specified help center.