edit_redirects
Apply batches of redirect rule additions, updates, and deletions in one atomic change, so bulk edits either fully succeed or fail without partial updates.
Instructions
Apply a batch of adds, updates and deletes to a site's user redirect rules, in order, as one change: all of them or none. Use this, or set_redirects, for bulk work rather than many single calls. Rule ids come from list_redirects and start with r_. File rules can't be changed here: an operation naming a file rule's line answers FileRule, with the line and the operation's index. Pass the version from list_redirects to refuse the batch if the rules changed since (StaleVersion, with the latest version). One invalid rule refuses the batch with InvalidRules, listing each error by the operation's index. Redirects apply only on the organization's own custom domains (CustomDomainRequired otherwise). Visitors get the change within about 5 minutes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"siteId": "<siteId>",
"operations": "<operations>"
},
"name": "edit_redirects"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteId | Yes | The site ID (from `list_sites`). | |
| version | No | The `version` the rules were read at, from `list_redirects`. Omit to apply the batch to whatever the latest list is. | |
| partition | No | Data partition the site lives in. Omit to use the user's home partition. | |
| operations | Yes | Applied in order, each to the list the ones before it left. |