Skip to main content
Version: 202601

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

    oseid stringrequired

    Edit session ID

    doc_id stringrequired

    Document ID of the file within the session

Bodyrequired

    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.

  • Array [
  • opstringrequired

    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.

    targetstring

    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.

    valueGoogleProtobufValue

    The new card, block, or blocks-array content. Applies to add_section, append_array_item, and update_slot.

    propsobject

    The settings fields to merge in. Applies to replace_props and replace_global.

    visibleboolean

    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.

    positionstring

    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).

    move_targetstring

    Id of the reference card next to which the target is placed. Applies to move_section.

    section_idstring

    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.

  • ]

Responses

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    data object[]

    The result of each operation.

  • Array [
  • opstring

    The operation type, echoing the op of the corresponding request item.

    resultstring

    Outcome of the operation: success if it succeeded, otherwise an error code (which may include a :detail suffix).

  • ]