Create, update, delete, or publish site redirect rules in bulk
Processes up to 500 redirect operations in a single request. Each redirect in the array is processed independently and the response includes per-item status. Prefer this over individual create/update calls when managing large sets of redirects.
put
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
A unique entity identifier
^[a-zA-Z0-9_-]+$siteIdstringRequired
The unique id of the site
Body
Responses
200
List of results for each redirect processed.
application/json
put/orgs/{organizationId}/sites/{siteId}/redirects
PUT /v1/orgs/{organizationId}/sites/{siteId}/redirects HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 52
{
"redirects": [
{
"source": "text",
"intent": "publish"
}
]
}200
List of results for each redirect processed.
{
"results": [
{
"status": "created",
"source": "text",
"draft": true,
"id": "text"
}
]
}Last updated
Was this helpful?