# Redirect Rules ## List redirect rules **get** `/v2/help_center/redirect_rules` Returns a paginated list of redirect rules within your organization. Redirect rules map old Help Center URLs to new article or collection destinations, enabling seamless migration from legacy help center systems. Only Help Centers with a custom domain configured support redirect rules. ### Query Parameters - `limit` - Number of items to return (1-100, default 10) - `cursor` - Cursor for pagination - `helpCenterId` - Filter by help center ID - `locale` - Filter by locale code - `targetType` - Filter by target type ("article" or "collection") ### Response Format Returns a list object with: - `object` - Always "list" - `data` - Array of redirect rule objects - `nextCursor` - Cursor for next page (null if no more results) ### Redirect Rule Object Each redirect rule includes: - `id` - Unique identifier (MongoDB ObjectId) - `helpCenterId` - Help center this rule belongs to - `locale` - Locale code used to resolve the target translation - `fromUrl` - Canonical source URL (query/hash stripped, hostname lowercased) - `targetType` - "article" or "collection" - `targetId` - ID of the target article or collection - `createdAt` - ISO 8601 timestamp when created - `updatedAt` - ISO 8601 timestamp when last updated ### Query Parameters - `cursor: optional string` An opaque cursor for pagination. Use the nextCursor value from a previous response to fetch the next page. - `helpCenterId: optional string` Filter redirect rules by help center ID - `limit: optional number` A limit on the number of objects to be returned, between 1 and 100. - `locale: optional "bn" or "bs" or "pt-BR" or 39 more` Filter redirect rules by locale - `"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"` - `targetType: optional "article" or "collection"` Filter redirect rules by target type - `"article"` - `"collection"` ### Header Parameters - `"Featurebase-Version": optional "2026-01-01.nova" or "2025-12-12.clover"` - `"2026-01-01.nova"` - `"2025-12-12.clover"` ### Returns - `data: array of RedirectRule` Array of redirect rules - `id: string` Redirect rule unique identifier - `createdAt: string` ISO 8601 timestamp when created - `fromUrl: string` Canonical source URL being redirected from (query and hash stripped) - `helpCenterId: string` Help center identifier - `locale: "bn" or "bs" or "pt-BR" or 39 more` Locale code for the redirect rule - `"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"` - `object: "redirect_rule"` Object type identifier - `"redirect_rule"` - `targetId: string` Target article or collection ID - `targetType: "article" or "collection"` Type of content the redirect points to - `"article"` - `"collection"` - `updatedAt: string` ISO 8601 timestamp when last updated - `nextCursor: string` Cursor for fetching the next page. Null if there are no more results. - `object: "list"` Object type identifier - `"list"` ### Example ```http curl https://do.featurebase.app/v2/help_center/redirect_rules \ -H "Authorization: Bearer $FEATUREBASE_API_KEY" ``` #### Response ```json { "data": [ { "id": "507f1f77bcf86cd799439011", "createdAt": "2026-02-11T12:00:00.000Z", "fromUrl": "https://help.example.com/en/old/getting-started", "helpCenterId": "ox6qrqprmsuqaunj", "locale": "en", "object": "redirect_rule", "targetId": "1234567", "targetType": "article", "updatedAt": "2026-02-11T12:00:00.000Z" } ], "nextCursor": null, "object": "list" } ``` ## Create a redirect rule **post** `/v2/help_center/redirect_rules` Creates a new redirect rule in your organization. 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 ### Header Parameters - `"Featurebase-Version": optional "2026-01-01.nova" or "2025-12-12.clover"` - `"2026-01-01.nova"` - `"2025-12-12.clover"` ### Body Parameters - `fromUrl: string` 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. - `helpCenterId: string` Help center identifier this redirect rule belongs to - `locale: "bn" or "bs" or "pt-BR" or 39 more` Locale code for the redirect rule. Used to resolve the target article/collection translation. - `"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"` - `targetId: string` ID of the target article or collection - `targetType: "article" or "collection"` Type of content the redirect points to - `"article"` - `"collection"` ### Returns - `RedirectRule object { id, createdAt, fromUrl, 6 more }` - `id: string` Redirect rule unique identifier - `createdAt: string` ISO 8601 timestamp when created - `fromUrl: string` Canonical source URL being redirected from (query and hash stripped) - `helpCenterId: string` Help center identifier - `locale: "bn" or "bs" or "pt-BR" or 39 more` Locale code for the redirect rule - `"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"` - `object: "redirect_rule"` Object type identifier - `"redirect_rule"` - `targetId: string` Target article or collection ID - `targetType: "article" or "collection"` Type of content the redirect points to - `"article"` - `"collection"` - `updatedAt: string` ISO 8601 timestamp when last updated ### Example ```http curl https://do.featurebase.app/v2/help_center/redirect_rules \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $FEATUREBASE_API_KEY" \ -d '{ "fromUrl": "https://help.example.com/en/old/getting-started", "helpCenterId": "ox6qrqprmsuqaunj", "locale": "en", "targetId": "10021362", "targetType": "article" }' ``` #### Response ```json { "id": "507f1f77bcf86cd799439011", "createdAt": "2026-02-11T12:00:00.000Z", "fromUrl": "https://help.example.com/en/old/getting-started", "helpCenterId": "ox6qrqprmsuqaunj", "locale": "en", "object": "redirect_rule", "targetId": "1234567", "targetType": "article", "updatedAt": "2026-02-11T12:00:00.000Z" } ``` ## Get a redirect rule by URL **get** `/v2/help_center/redirect_rules/by-url` Retrieves a specific redirect rule by its source URL. The `url` query parameter is normalized before matching: query parameters and hash fragments are stripped, the hostname is lowercased, and trailing slashes are removed. This is the same normalization applied when creating a redirect rule. ### Query Parameters - `url` (required) - Full absolute URL to look up (http or https) ### Response Returns a redirect rule object with: - `id` - Unique identifier (MongoDB ObjectId) - `helpCenterId` - Help center this rule belongs to - `locale` - Locale code - `fromUrl` - Canonical source URL being redirected from - `targetType` - "article" or "collection" - `targetId` - ID of the target article or collection - `createdAt` - ISO 8601 timestamp when created - `updatedAt` - ISO 8601 timestamp when last updated ### Errors - `400` - Invalid URL format - `404` - No redirect rule exists for the given URL ### Query Parameters - `url: string` Full absolute URL to look up. The URL is normalized before matching: query parameters and hash fragments are stripped, the hostname is lowercased, and trailing slashes are removed. ### Header Parameters - `"Featurebase-Version": optional "2026-01-01.nova" or "2025-12-12.clover"` - `"2026-01-01.nova"` - `"2025-12-12.clover"` ### Returns - `RedirectRule object { id, createdAt, fromUrl, 6 more }` - `id: string` Redirect rule unique identifier - `createdAt: string` ISO 8601 timestamp when created - `fromUrl: string` Canonical source URL being redirected from (query and hash stripped) - `helpCenterId: string` Help center identifier - `locale: "bn" or "bs" or "pt-BR" or 39 more` Locale code for the redirect rule - `"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"` - `object: "redirect_rule"` Object type identifier - `"redirect_rule"` - `targetId: string` Target article or collection ID - `targetType: "article" or "collection"` Type of content the redirect points to - `"article"` - `"collection"` - `updatedAt: string` ISO 8601 timestamp when last updated ### Example ```http curl https://do.featurebase.app/v2/help_center/redirect_rules/by-url \ -H "Authorization: Bearer $FEATUREBASE_API_KEY" ``` #### Response ```json { "id": "507f1f77bcf86cd799439011", "createdAt": "2026-02-11T12:00:00.000Z", "fromUrl": "https://help.example.com/en/old/getting-started", "helpCenterId": "ox6qrqprmsuqaunj", "locale": "en", "object": "redirect_rule", "targetId": "1234567", "targetType": "article", "updatedAt": "2026-02-11T12:00:00.000Z" } ``` ## Get a redirect rule by ID **get** `/v2/help_center/redirect_rules/{id}` Retrieves a specific redirect rule by its unique identifier. Returns the redirect rule object if found in your organization. ### Response Returns a redirect rule object with: - `id` - Unique identifier (MongoDB ObjectId) - `helpCenterId` - Help center this rule belongs to - `locale` - Locale code - `fromUrl` - Canonical source URL being redirected from - `targetType` - "article" or "collection" - `targetId` - ID of the target article or collection - `createdAt` - ISO 8601 timestamp when created - `updatedAt` - ISO 8601 timestamp when last updated ### Errors - `404` - Redirect rule not found in your organization ### Path Parameters - `id: string` Redirect rule unique identifier ### Header Parameters - `"Featurebase-Version": optional "2026-01-01.nova" or "2025-12-12.clover"` - `"2026-01-01.nova"` - `"2025-12-12.clover"` ### Returns - `RedirectRule object { id, createdAt, fromUrl, 6 more }` - `id: string` Redirect rule unique identifier - `createdAt: string` ISO 8601 timestamp when created - `fromUrl: string` Canonical source URL being redirected from (query and hash stripped) - `helpCenterId: string` Help center identifier - `locale: "bn" or "bs" or "pt-BR" or 39 more` Locale code for the redirect rule - `"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"` - `object: "redirect_rule"` Object type identifier - `"redirect_rule"` - `targetId: string` Target article or collection ID - `targetType: "article" or "collection"` Type of content the redirect points to - `"article"` - `"collection"` - `updatedAt: string` ISO 8601 timestamp when last updated ### Example ```http curl https://do.featurebase.app/v2/help_center/redirect_rules/$ID \ -H "Authorization: Bearer $FEATUREBASE_API_KEY" ``` #### Response ```json { "id": "507f1f77bcf86cd799439011", "createdAt": "2026-02-11T12:00:00.000Z", "fromUrl": "https://help.example.com/en/old/getting-started", "helpCenterId": "ox6qrqprmsuqaunj", "locale": "en", "object": "redirect_rule", "targetId": "1234567", "targetType": "article", "updatedAt": "2026-02-11T12:00:00.000Z" } ``` ## Update a redirect rule **patch** `/v2/help_center/redirect_rules/{id}` Updates an existing redirect rule. Only include the fields you wish to update. If `fromUrl` is provided, it will be re-normalized and validated against the Help Center's custom domain. If `targetType` or `targetId` is changed, the new target must exist and have a resolvable URL. ### Path Parameters - `id` - The unique identifier of the redirect rule to update ### Request Body All fields are optional. Only provided fields will be updated: - `helpCenterId` - The help center ID - `locale` - Locale code - `fromUrl` - Updated source URL (will be re-normalized) - `targetType` - "article" or "collection" - `targetId` - ID of the new target article or collection ### Response Returns the updated redirect rule object. ### Errors - `404` - Redirect rule not found - `400` - Invalid data, domain mismatch, duplicate fromUrl, or target not found ### Path Parameters - `id: string` Redirect rule unique identifier ### Header Parameters - `"Featurebase-Version": optional "2026-01-01.nova" or "2025-12-12.clover"` - `"2026-01-01.nova"` - `"2025-12-12.clover"` ### Body Parameters - `fromUrl: optional string` 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. - `helpCenterId: optional string` Help center identifier - `locale: optional "bn" or "bs" or "pt-BR" or 39 more` Locale code for the redirect rule - `"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"` - `targetId: optional string` ID of the target article or collection - `targetType: optional "article" or "collection"` Type of content the redirect points to - `"article"` - `"collection"` ### Returns - `RedirectRule object { id, createdAt, fromUrl, 6 more }` - `id: string` Redirect rule unique identifier - `createdAt: string` ISO 8601 timestamp when created - `fromUrl: string` Canonical source URL being redirected from (query and hash stripped) - `helpCenterId: string` Help center identifier - `locale: "bn" or "bs" or "pt-BR" or 39 more` Locale code for the redirect rule - `"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"` - `object: "redirect_rule"` Object type identifier - `"redirect_rule"` - `targetId: string` Target article or collection ID - `targetType: "article" or "collection"` Type of content the redirect points to - `"article"` - `"collection"` - `updatedAt: string` ISO 8601 timestamp when last updated ### Example ```http curl https://do.featurebase.app/v2/help_center/redirect_rules/$ID \ -X PATCH \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $FEATUREBASE_API_KEY" \ -d '{ "fromUrl": "https://help.example.com/en/old/getting-started", "helpCenterId": "ox6qrqprmsuqaunj", "locale": "en", "targetId": "10021362", "targetType": "article" }' ``` #### Response ```json { "id": "507f1f77bcf86cd799439011", "createdAt": "2026-02-11T12:00:00.000Z", "fromUrl": "https://help.example.com/en/old/getting-started", "helpCenterId": "ox6qrqprmsuqaunj", "locale": "en", "object": "redirect_rule", "targetId": "1234567", "targetType": "article", "updatedAt": "2026-02-11T12:00:00.000Z" } ``` ## Delete a redirect rule **delete** `/v2/help_center/redirect_rules/{id}` Deletes an existing redirect rule. The associated Redis cache entry is also invalidated. ### Path Parameters - `id` - The unique identifier of the redirect rule to delete ### Response Returns a deletion confirmation object: - `id` - The ID of the deleted redirect rule - `object` - Always "redirect_rule" - `deleted` - Always true ### Errors - `404` - Redirect rule not found in your organization ### Path Parameters - `id: string` Redirect rule unique identifier ### Header Parameters - `"Featurebase-Version": optional "2026-01-01.nova" or "2025-12-12.clover"` - `"2026-01-01.nova"` - `"2025-12-12.clover"` ### Returns - `id: string` Unique identifier of the deleted redirect rule - `deleted: true` Indicates the resource was deleted - `true` - `object: "redirect_rule"` Object type identifier - `"redirect_rule"` ### Example ```http curl https://do.featurebase.app/v2/help_center/redirect_rules/$ID \ -X DELETE \ -H "Authorization: Bearer $FEATUREBASE_API_KEY" ``` #### Response ```json { "id": "507f1f77bcf86cd799439011", "deleted": true, "object": "redirect_rule" } ``` ## Domain Types ### Redirect Rule - `RedirectRule object { id, createdAt, fromUrl, 6 more }` - `id: string` Redirect rule unique identifier - `createdAt: string` ISO 8601 timestamp when created - `fromUrl: string` Canonical source URL being redirected from (query and hash stripped) - `helpCenterId: string` Help center identifier - `locale: "bn" or "bs" or "pt-BR" or 39 more` Locale code for the redirect rule - `"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"` - `object: "redirect_rule"` Object type identifier - `"redirect_rule"` - `targetId: string` Target article or collection ID - `targetType: "article" or "collection"` Type of content the redirect points to - `"article"` - `"collection"` - `updatedAt: string` ISO 8601 timestamp when last updated ### Redirect Rule Delete Response - `RedirectRuleDeleteResponse object { id, deleted, object }` - `id: string` Unique identifier of the deleted redirect rule - `deleted: true` Indicates the resource was deleted - `true` - `object: "redirect_rule"` Object type identifier - `"redirect_rule"`