Undo a person's decision on a tracked change, putting the change back open
For the review pane (the app-only undo_decision command; agents never undo a person's decision). When a change is approved or rejected, the engine snapshots the paragraph(s) holding it. Undo restores that snapshot, so the tracked change comes back open with its original author, reason and owner, and deletes the decision record (and the records of the other half of the same change, such as a replacement's insertion). It is refused unless the paragraph still reads exactly as the decision left it, so an undo never overwrites later work: when two decisions touched one paragraph, undo the later one first. Decisions made before undo existed, changes outside body paragraphs (a table row) and compare-view decisions have no snapshot. The decision must belong to this document. The document is saved in place (same id and version), guarded by expected_content_sha256. The undo and its document.decision_undone usage event (the signed-in person, the decision and its outcome, the hashes before and after) commit in one transaction: if the event can't be recorded, the undo isn't saved.
/documents/{documentId}/decisions/{decisionId}/undo Path parameters
documentIdstring RequireddecisionIdstring RequiredThe decided Track entry's decisionId.
Headers
Authorizationstring RequiredBearer <session token>: the signed-in user’s Scaffold session token.
x-org-idstring Required
Body
expected_content_sha256string RequiredThe document's current contentSha256, as the pane last saw it.
Returns
documentobjectThe persisted upload/document row, as returned by every route that creates or mutates upload content (create, save draft, rename, delete, new version, revision-apply, redline edits).
Show 19 fields
idstringartifactIdstring | nullorgIdstringcreatedByUserIdstring | nullfileNamestringmimeTypestringsizeBytesintegerpurposestringOne of
source_docplaybookclientReferenceIdstring | nulldocumentSeriesIdstringdocumentVersionintegerparentUploadIdstring | nullversionKindstringOne of
originalworking_draftstorageKeystring | nullcontentSha256string | nullhasBinarybooleanstatusstringcreatedAtstringupdatedAtstring
revisionsobject[]Show 7 fields
ordinalinteger RequiredThe change's position in document order.
change_idstring RequiredThe id to pass in accepted_change_ids or rejected_change_ids.
kindstring Requiredinsert and delete are text changes, paragraph_mark is an inserted or deleted paragraph mark (a paragraph split or join; it carries no text of its own), proposed is a Scaffold change marker, and the -prop-change kinds are tracked formatting or structure changes.
One of
insertdeleteparagraph_markproposedr-prop-changep-prop-changetbl-prop-changetr-prop-changetc-prop-changesect-prop-changeauthorstring | nulldatestring | nulltext_previewstring RequiredA short excerpt of the changed text.
justificationstring | nullThe reason recorded with the change, shown to the reviewer.
contentBase64stringrenderContentBase64string | nulltrackobject | nullNull when the decisions store failed to record/load; the apply still succeeds.
Show 3 fields
itemsobject[]Show 14 fields
idstring Requiredstatestring RequiredOne of
openinbacklabelstring RequiredPositional label, e.g. "Change 3".
kindstring | nulltextPreviewstringjustificationstring | nullThe reason the change carries. On a decided entry, the reason it carried when it was decided (null for decisions made before that was recorded).
authorstring | nullPresent on both open and decided entries.
datestring | nullOpen entries only.
decidedAtstringDecided entries only.
decidedByUserIdstring | nullDecided entries only.
decisionIdstring | nullDecided entries only. The decision record's id, for the undo route.
decidedByNamestring | nullDecided entries only. Who decided it: their display name, or their email when that is empty or equal to it; null when unknown.
decidedByYoubooleanDecided entries only. True when the person reading the Track decided it.
undoablebooleanDecided entries only. True when the decision has a snapshot, so the undo route can put the change back (it may still refuse if the paragraph changed since).
hereIdstring | nullId of the first open entry, or null when nothing is open.
countsobjectShow 4 fields
openinteger Requiredininteger Requiredbackinteger Requiredtotalinteger Required