Approve or reject tracked revisions on a document working draft
/documents/{documentId}/revisions/apply Path parameters
documentIdstring Required
Headers
Authorizationstring RequiredBearer <session token>: the signed-in user’s Scaffold session token.
x-org-idstring Required
Body
accepted_change_idsstring[]rejected_change_idsstring[]recordDecisionbooleanFalse skips the Track's decision record. Sent only when an agent withdraws its own proposal (MCP revert_revisions); human approve/reject omits it. Also accepted as record_decision.
Default
true
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 10 fields
idstring Requiredstatestring RequiredOne of
openinbacklabelstring RequiredPositional label, e.g. "Change 3".
kindstring | nulltextPreviewstringjustificationstring | nullOpen entries only.
authorstring | nullPresent on both open and decided entries.
datestring | nullOpen entries only.
decidedAtstringDecided entries only.
decidedByUserIdstring | nullDecided entries only.
hereIdstring | nullId of the first open entry, or null when nothing is open.
countsobjectShow 4 fields
openinteger Requiredininteger Requiredbackinteger Requiredtotalinteger Required