Reviews
Generate redline
Turn some of a review’s proposed amendments into tracked changes, or apply decisions to a Redline Review.
POST
Writes the amendments of the findings you choose into the reviewed documents as tracked changes. The output is a new file: a DOCX when the amendments change one document, or a ZIP of one DOCX per document when they change several. By default it includes every issue that has a proposed amendment. Pass
finding_ids to choose a subset.
A finished review already has a redline of every proposed amendment in its redline_file_id. Use this endpoint when you want only some of them. The new file does not replace the review’s redline_file_id: read its id from the operation’s result. It lives with the review, so anyone who can read the review can read it.
It runs as an operation, because a large document can take a few minutes. It works on playbook and instructions reviews whose reviewed documents include a DOCX, and on counterparty_edits reviews.
Redline reviews
For acounterparty_edits review, pass decisions instead of finding_ids: what to do with each of the counterparty’s changes. Wordsmith applies them to the document as the counterparty returned it, so applying again starts afresh rather than stacking. A change you leave out stays as the counterparty’s tracked change. Without decisions, every recommendation is applied, and changes recommended for escalation or marked automatic_application_held stay as they are. The new file becomes the review’s redline_file_id. A batch that omits saved choices on commercial or related changes is refused before replacing the document (review_escalation_decision_replay_failed, not retryable unchanged). Use the review panel, or submit complete explicit decisions with a new idempotency key only when all saved choices are known; do not infer them from recommendations.
Applying decisions needs edit access to the review, as in Wordsmith. It returns an operation of type review_decisions, which cannot be cancelled.
Authentication
Requires an API key, or an OAuth token withreviews:write. Reading the new file needs files:read.
Path parameters
Headers
A unique key for this request, such as a UUID. A repeat with the same key and body within 30 days returns the same operation and makes no second file.
Body parameters
The body is optional: an empty body takes every default.The findings whose amendments to apply, from List findings. Each must belong to this review and propose an amendment. Defaults to every finding whose
status is issue and that proposes an amendment.counterparty_edits reviews only, up to 300 (a review’s most changes): { "finding_id", "action", "comment" } per change, one per finding. action is accept or reject for a tracked change, amend to apply its counter_proposal, reply for a question, or skip to leave it. comment is the comment or reply sent with it, up to 10,000 characters. When action is the finding’s recommendation (or its escalation.position), it defaults to the finding’s suggested_reply; otherwise it defaults to none, because the suggestion argues for the recommendation. An empty string sends none. Refused with finding_ids.Seconds to wait for the redline before responding, from
0 to 20. A short document often finishes inside 20.A public HTTPS URL that receives a signed
operation.succeeded, operation.failed or operation.cancelled event when the redline is ready. An API key signs it with its webhook secret. For an OAuth app, the response carries the callback_secret that signs it. See Callbacks for OAuth apps.Query parameters
true answers an operation that is still queued or running with 202 Accepted, a Location header and a
Retry-After header in seconds. Location is the operation’s Get operation
URL, with respond_async=true. Poll it until the response is not 202; that response is the finished operation.
A succeeded operation is a 200. A failed or cancelled one is a 422 with the operation as its body, so an
automation’s step fails instead of passing on a result that is not there. Power Automate and Logic Apps follow
this pattern by themselves. Pass true to turn it on. A value that is not a boolean is a 400, and a call that
starts work then starts nothing.Response
Returns202 with an operation of type review_redline. Its resource is the review. A repeat with the same Idempotency-Key returns 200 with the same operation.
With respond_async=true, the status code follows the operation’s status instead, as the respond_async query parameter above describes.
When status is succeeded, result is { "file_id" }: the new tracked-changes DOCX, or a ZIP of DOCX files when the amendments changed more than one document. Read its content_type with Get file before you open it. Running this endpoint again makes a new file. When none of the chosen amendments could be applied, the operation fails with error.code no_amendments. When the redline could not be written, it fails with redline_failed, which is retryable. Cancelling the operation stops it: a file made before the cancel arrived is deleted, and the operation ends cancelled.
For a counterparty_edits review, the operation’s type is review_decisions, and progress.stage is apply while the decisions are applied. When none of them changed the document, the operation fails with no_amendments. It fails with apply_failed when the apply could not finish, and with apply_superseded when a later apply replaced it before it finished. Both are retryable.