Skip to main content
Version: 202601

Revert AI card operation

POST 

/openapi/2026-01/themes/edit-sessions/:oseid/gen-blocks/revert

Restore the card to its state before the operation identified by revert_id (returned by any create, update, delete, or revert). Reverting also returns a new revert_id, so you can undo and redo repeatedly.

Request​

Path Parameters

    oseid stringrequired

    Edit session ID

Bodyrequired

    revert_idstring

    32-character token taken from any write response (create / update / delete / revert itself); pass it back as-is. The same id may be used repeatedly

    revert_idsstring[]

    Batch form of revert_id, at most 20. Executed in array order. Takes precedence when both are given; at least one of the two is required

Responses​

OK

Schema
    codestring

    error code

    messagestring

    error message

    data object
    data object[]

    Result of each revert_id, in request order

  • Array [
  • revert_idstring

    The revert ID

    resultstring

    success: reverted; b_record_not_found: the id does not exist or belongs to another edit session; skipped: not executed because an earlier item failed; error:<detail>: unexpected error, this item was rolled back. Execution stops at the first failure; items that already succeeded are not rolled back

    new_revert_idstring

    ID for redoing this step; only present on success

    changed object[]

    Files changed by this step. Only present on success; empty when the same id is reverted again

  • Array [
  • typestring

    File directory, e.g. templates

    locationstring

    File name, e.g. index.json

    actionstring

    updated: content restored; removed: file removed

  • ]
  • ]