Batch edit operations
POST/openapi/2026-01/themes/edit-sessions/:oseid/files/:doc_id/operations
Execute multiple edit operations in one request; each operation runs and is saved independently, and a failure on one does not stop the others.
Request
Path Parameters
Edit session ID
Document ID of the file within the session
- application/json
- Body
- Example
Bodyrequired
- Array [
- ]
operations object[]required
Ordered list of theme operations executed in one batch.
Each op is applied and persisted independently, and a failure
on one does not stop the others. See ThemeOperation.
The operation to perform. One of:
add_section, remove_section, move_section, replace_props, set_visibility,
append_array_item, remove_array_item, move_array_item, update_slot,
replace_global, set_script_visibility.
Path to the target card or block; its meaning depends on op. Pass a section's id to
address a section, or a dotted path such as sec1.blocks.0 (or deeper, sec1.blocks.0.blocks.2)
to address a nested block. A leading sections. segment is also accepted
(sections.sec1.blocks.0) — the same syntax the AI card instances field returns.
The new card, block, or blocks-array content. Applies to add_section,
append_array_item, and update_slot.
The settings fields to merge in. Applies to replace_props and replace_global.
Target visibility: true shows, false hides. Applies to set_visibility and
set_script_visibility. Omitting the field is treated as false (hide), never as
"leave unchanged" — always send it explicitly.
Placement before or after the reference card. For add_section the reference is
target; for move_section it is move_target (target is the card being moved).
Id of the reference card next to which the target is placed. Applies to move_section.
Explicit id for the new section. Applies to add_section; optional — the server
generates one when omitted. Idempotent success when the id already exists with the same type.
{
"operations": [
{
"op": "string",
"target": "string",
"props": {},
"visible": true,
"position": "string",
"move_target": "string",
"section_id": "string"
}
]
}
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
- Array [
- ]
error code
error message
data object
data object[]
The result of each operation.
The operation type, echoing the op of the corresponding request item.
Outcome of the operation: success if it succeeded, otherwise an error code
(which may include a :detail suffix).
{
"code": "string",
"message": "string",
"data": {
"data": [
{
"op": "string",
"result": "string"
}
]
}
}