Reviews
Create review
Start a playbook, instructions or Redline Review of one or more files.
POST
Starts a review and returns an operation that tracks it. A review takes minutes, so the response comes back before it finishes. Poll the operation, long-poll it with
wait, or receive a callback.
type picks one of three review flows:
playbookruns the checks of a saved playbook against the files. Find playbook ids with List playbooks.instructionsbuilds checks from your free-textinstructions, then runs them. Use it when no playbook fits.counterparty_edits(a Redline Review) goes through the other side’s tracked changes and comments on one DOCX of your own paper. Each change becomes a finding with a recommendation: accept, reject, amend with our counter-edit, reply, or escalate.partynames your side and is required. Aplaybook_idandinstructionsare optional and ground the recommendations.
Redline reviews
A Redline Review takes one DOCX that has tracked changes or comments. If the other side returned a clean copy instead, run Compare files with your original asoriginal_file_id and their copy as revised_file_id, then review the redline it returns. Wordsmith groups the changes before the review exists, so the operation reads queued, then running with progress.stage preparing, before the checks start. When the checks finish, the review applies its own recommendations: progress.stage is apply, and the operation succeeds once the document is written to redline_file_id. If that apply fails, the operation fails with apply_failed: the findings are still there to read, and you can apply decisions yourself. Changes recommended for escalation stay undecided: an API review files no request to a teammate. Apply other decisions with Generate redline.
A start the review refuses fails the operation with error.code no_changes (no counterparty changes to review), too_many_changes, too_large, context_too_large, file_unavailable or playbook_invalid. A context_too_large refusal means the complete playbook and review context cannot fit together, so the requested review was not performed. It has retryable: false: use a smaller playbook or reduce the review context before starting a new review.
Every input is a file_id from the files API. To get one, upload the bytes with Upload URL and finish with Complete upload, or use Import file for a URL. The review works on its own copies of the files, so your files stay where they are.
When the checks propose amendments and the first file is a DOCX, the review also writes a tracked-changes redline of them. Its id is the review’s redline_file_id. To redline only some findings, use Generate redline once the review has finished.
Authentication
Requires an API key, or an OAuth token withreviews:write and files:read. The caller’s role must be allowed to start document reviews and to upload files.
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 starts no new review. A repeat with a different body returns
409 idempotency_key_reused.Body parameters
The files to review, 1 to 10, each a DOCX or PDF, as the ids this API returns. Files are reviewed together, such as an agreement and its schedules. A file may appear once. A
counterparty_edits review takes one DOCX.The playbook to run. Required when
type is playbook, optional for counterparty_edits, and refused for instructions.What to check, in plain language, up to 10,000 characters. Required when
type is instructions, optional guidance for counterparty_edits, and refused for playbook.The side the review acts for, as named in the document, e.g.
"Customer". Up to 200 characters. Required for counterparty_edits. Otherwise, when omitted, the review runs without one and the review’s party stays null.Seconds to wait for the review to finish before responding, from
0 to 20. Most reviews take longer, so the operation usually comes back queued or running.A public HTTPS URL that receives a signed
operation.succeeded, operation.failed or operation.cancelled event when the review finishes. 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. Its resource is the new review, which you can read at once with Get 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.
While the review runs, progress.stage is checks, then redline, and progress.completed counts the checks with a result out of progress.total.
When status is succeeded, result holds review_id, the finding counts and redline_file_id. Read the findings with List findings. A review that stops is failed with error.code review_failed, or worker_lost when its worker stopped responding. Both are retryable. Cancelling the operation stops the review.