Skip to main content
Help Centers

Create a redirect rule

Creates a new redirect rule in your organization.

POST
/v2/help_center/redirect_rules

The fromUrl is normalized on creation: query parameters and hash fragments are stripped, the hostname is lowercased, and trailing slashes are removed. The fromUrl hostname must match the Help Center's configured custom domain.

The target article or collection must exist and have a resolvable URL (i.e., a published translation with a slug).

Request Body

Required attributes:

  • helpCenterId - The ID of the help center this rule belongs to
  • locale - Locale code used to resolve the target translation
  • fromUrl - The full absolute URL to redirect from (must match the help center's custom domain)
  • targetType - "article" or "collection"
  • targetId - The ID of the target article or collection

Response

Returns the created redirect rule object.

Errors

  • 400 - Invalid request data, fromUrl does not match custom domain, or target not found
Authorizationstringheaderrequired

API key as Bearer token. Use: Authorization: Bearer sk_...

Featurebase-Versionenum<string>header

API version for this request. Defaults to your organization's configured API version if not specified.

Available options: 2026-08-19.orbit, 2026-01-01.nova, 2025-12-12.clover
Example: 2026-08-19.orbit

Body

application/json
fromUrlstringrequired

Full absolute URL to redirect from. Must use http or https protocol. Query parameters and hash fragments are stripped during normalization. The hostname must match the Help Center custom domain.

Maximum string length: 2048
Example: https://help.example.com/en/old/getting-started
helpCenterIdstringrequired

Help center identifier this redirect rule belongs to

Required string length: 1 - 16
Pattern: ^[a-zA-Z0-9]+$
Example: ox6qrqprmsuqaunj
localeenum<string>required

Locale code for the redirect rule. Used to resolve the target article/collection translation.

Available options: ar, am, fa, ht, lo, my, pa, ps, so, tl, ur, he, ta, te, mr, gu, kn, ml, ha, jv, yo, ig, uz, ne, sd, az, si, km, kk, bn, bs, pt-BR, bg, ca, hr, cs, da, nl, en, et, fi, fr, de, el, hi, hu, id, it, ja, ko, lv, lt, ms, mn, nb, pl, pt, ro, ru, sr, zh-CN, sk, sl, es, sw, sv, th, zh-TW, tr, uk, vi
Example: en
targetIdstringrequired

ID of the target article or collection

Required string length: 1 - 16
Pattern: ^[a-zA-Z0-9]+$
Example: 10021362
targetTypeenum<string>required

Type of content the redirect points to

Available options: article, collection
Example: article

Response

application/json

Created

createdAtstringrequired

ISO 8601 timestamp when created

Example: 2026-02-11T12:00:00.000Z
fromUrlstringrequired

Canonical source URL being redirected from (query and hash stripped)

Example: https://help.example.com/en/old/getting-started
helpCenterIdstringrequired

Help center identifier

Example: ox6qrqprmsuqaunj
idstringrequired

Redirect rule unique identifier

Example: 507f1f77bcf86cd799439011
localeenum<string>required

Locale code for the redirect rule

Available options: ar, am, fa, ht, lo, my, pa, ps, so, tl, ur, he, ta, te, mr, gu, kn, ml, ha, jv, yo, ig, uz, ne, sd, az, si, km, kk, bn, bs, pt-BR, bg, ca, hr, cs, da, nl, en, et, fi, fr, de, el, hi, hu, id, it, ja, ko, lv, lt, ms, mn, nb, pl, pt, ro, ru, sr, zh-CN, sk, sl, es, sw, sv, th, zh-TW, tr, uk, vi
Example: en
objectenum<string>required

Object type identifier

Available options: redirect_rule
Example: redirect_rule
targetIdstringrequired

Target article or collection ID

Example: 1234567
targetTypeenum<string>required

Type of content the redirect points to

Available options: article, collection
Example: article
updatedAtstringrequired

ISO 8601 timestamp when last updated

Example: 2026-02-11T12:00:00.000Z