Ir al contenido principal
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
Authorizationstringheaderobligatorio

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.

Opciones disponibles: 2026-08-19.orbit, 2026-01-01.nova, 2025-12-12.clover
Ejemplo: 2026-08-19.orbit

Cuerpo

application/json
fromUrlstringobligatorio

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
Ejemplo: https://help.example.com/en/old/getting-started
helpCenterIdstringobligatorio

Help center identifier this redirect rule belongs to

Required string length: 1 - 16
Patrón: ^[a-zA-Z0-9]+$
Ejemplo: ox6qrqprmsuqaunj
localeenum<string>obligatorio

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

Opciones disponibles: 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
Ejemplo: en
targetIdstringobligatorio

ID of the target article or collection

Required string length: 1 - 16
Patrón: ^[a-zA-Z0-9]+$
Ejemplo: 10021362
targetTypeenum<string>obligatorio

Type of content the redirect points to

Opciones disponibles: article, collection
Ejemplo: article

Respuesta

application/json

Created

createdAtstringobligatorio

ISO 8601 timestamp when created

Ejemplo: 2026-02-11T12:00:00.000Z
fromUrlstringobligatorio

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

Ejemplo: https://help.example.com/en/old/getting-started
helpCenterIdstringobligatorio

Help center identifier

Ejemplo: ox6qrqprmsuqaunj
idstringobligatorio

Redirect rule unique identifier

Ejemplo: 507f1f77bcf86cd799439011
localeenum<string>obligatorio

Locale code for the redirect rule

Opciones disponibles: 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
Ejemplo: en
objectenum<string>obligatorio

Object type identifier

Opciones disponibles: redirect_rule
Ejemplo: redirect_rule
targetIdstringobligatorio

Target article or collection ID

Ejemplo: 1234567
targetTypeenum<string>obligatorio

Type of content the redirect points to

Opciones disponibles: article, collection
Ejemplo: article
updatedAtstringobligatorio

ISO 8601 timestamp when last updated

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