For the complete documentation index, see llms.txt. This page is also available as Markdown.

List all URL redirect rules configured for a site

Returns a paginated list of redirect rules for the site. Supports filtering by draft status and searching by path. Use this to audit redirects, find a specific rule before updating it, or check whether draft redirects are pending publication.

Available in MCP
get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

A unique entity identifier

Pattern: ^[a-zA-Z0-9_-]+$
siteIdstringRequired

The unique id of the site

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

searchstringOptional

Search for a redirect by path

draftbooleanOptional

Filter redirects by draft mode.

Default: false
orderBystring · enumOptional

The field to sort site redirects by. createdAt returns the most recently created redirects first. updatedAt returns the most recently updated redirects first (falling back to the creation date for redirects never updated). source returns redirects sorted alphabetically by source path. Defaults to 'createdAt'.

Default: createdAtPossible values:
Responses
200

The list of redirects for the site.

application/json
countnumberOptional

Total count of objects in the list

get/orgs/{organizationId}/sites/{siteId}/redirects
GET /v1/orgs/{organizationId}/sites/{siteId}/redirects HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

The list of redirects for the site.

{
  "next": {
    "page": "text"
  },
  "count": 1,
  "items": [
    {
      "object": "site-redirect",
      "id": "text",
      "source": "text",
      "draft": true,
      "captureWildcard": true,
      "permanent": true,
      "destination": {
        "kind": "site-section",
        "siteSectionId": "text"
      },
      "createdAt": "2026-01-01T00:00:00.000Z",
      "updatedAt": "2026-01-01T00:00:00.000Z"
    }
  ]
}

Last updated

Was this helpful?