ReferencePages
Apply a batch of operations to a page draft
Same operations as live batch, no If-Match. Always all-or-nothing.
Responses
- 200
{results, draft} - any op error → 422
{message: "Draft batch failed: operation <index> (<path>): <op message>", code: "operation_failed", results}; per-op details stay inresults[].error - also
batch_too_large,empty_batch,invalid_request(incl.?dry_run=1, unsupported on drafts),slug_apply_failed,concurrent_modification
AuthorizationBearer <token>
Personal access token tied to a user account. Requires the X-Nimbu-Site header to scope requests.
In: header
X-Nimbu-Site<token>
Identifier of the site context when authenticating with a personal access token.
In: header
Path Parameters
page_id*string
Page identifier or fullpath
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/pages/string/draft/batch" \ -H "Content-Type: application/json" \ -d '{ "operations": [ { "op": "set", "path": "string" } ] }'{
"results": [
{
"index": 0,
"status": "ok",
"path": "/title"
}
],
"draft": {
"id": "66f1a2b3c4d5e6f7a8b9c0e0",
"page_id": "66f1a2b3c4d5e6f7a8b9c0d0",
"content": {
"title": "Batch Draft Title"
}
}
}{
"message": "At least one operation is required",
"code": "empty_batch"
}