Skip to content
Version Story REST API

Redlining, Inside Your Product

Put lawyer-grade redlining inside your own software. Register an account, create an API key, and generate redlines over plain HTTP.

What you can build

Four Things The Engine Does

The same deterministic, Rust-based comparison engine that powers the Version Story app, reachable from your own code over plain HTTP.

Redline

A true comparison of a base document against each revision — every insertion, deletion, and move, with footnotes, tables, and numbering intact.

Merge

Several revisions of one base folded into a single document, each edit labeled with the draft it came from and competing edits flagged rather than silently resolved.

Combine

Independent drafts that share no common base folded into one document, so a clean-slate rewrite and the original still read as one review.

Version history

An ordered chain of versions attributed change by change, so you can see which draft introduced every surviving edit.

Each one returns the same set of files: a PDF redline to show people, a Word document with real tracked changes, a changed-pages-only PDF, an interactive HTML redline to embed in your own app, a markdown rendering built for a model to read, and JSON for your own code to act on.

Any document can also be downloaded with its metadata removed, its authors, dates, network paths and hidden text, and its comments and tracked changes when you choose, with a report of everything it carried. See Clean metadata.

“Version Story was quick to integrate, and our lawyers were impressed with the quality of the redlines.”

It stood out from the other solutions we evaluated.
Headshot of David Stewart
David StewartCTO, Blackletter
Get started

An API Key
In Minutes

You do not need to talk to sales to get a key. Register, open Settings, and create one. Keys belong to your organization rather than to whoever created them, so an integration keeps working when people join and leave.

  1. 01

    Register an account

    Free to start, no sales call. The account you sign up with becomes the organization your API keys belong to.

  2. 02

    Create an API key

    Open the Developer page from the web app's sidebar and create a key under API keys. The secret is shown once, so store it in your secrets manager before you dismiss it.

  3. 03

    Make your first call

    Submit two documents, poll until the redline is ready, download it. Three requests, and most teams have it working in an afternoon.

How it works

Send Documents,
Get Redlines Back

Send us the documents, ask whether the result is ready, download it when it is. The engine handles the redlining; your product handles the screens, the workflow, and the people.

Embed redlines in your product

Show the PDF redline, or embed the interactive HTML redline, inside your own client portal or matter management system, so your people never leave the software they already use.

Redline every draft automatically

Each time a document arrives — from a counterparty, your document management system, an intake form — a comparison runs without anyone having to ask for it.

The same deterministic engine

The same engine behind the Version Story app, with the same precision and the same files your lawyers already trust.

The first call

Every request carries your key as a bearer token. Post the two documents and you get a reference back immediately; nothing is generated yet.

POST /v1/compare
curl -sS https://api.versionstory.com/v1/compare \
  -H "Authorization: Bearer vs_live_..." \
  -F "original=@NDA v1.docx" \
  -F "modified=@NDA v2.docx"

Ask about the reference again and, once the redline is ready, you get a download link. Name more than one format and the same call returns the Word file alongside the PDF, the changed-pages-only PDF, the Markdown rendering, and the JSON. Merging several people’s revisions of one document is the same shape, at POST /v1/merge.

Formats

Every Format,
One Call

Lawyers get the PDF, and Word to negotiate on. Agents get Markdown. All of them come from the same comparison, so they always agree.

Built for agents to read

The markdown rendering carries the same change set with the changes marked inline. An agent reads it directly — no unzipping a .docx, no re-deriving the diff from two source documents and hoping it matches ours. Who made each change, and which draft it came from, is stated once at the top; in a merged or version history document each change names its draft, so a multi-way redline stays attributable down to the span. On a long document, the top of the file also holds a digest of every change, so an agent summarizes from its first read.

Insertions and deletions
6. The Recipient will <ins id="12">promptly </ins>notify the Company of any
   <del id="13">unauthorized </del>disclosure of Confidential Information.

Moves, multi-author merges, and conflicts have their own elements. The full vocabulary, with worked examples, is in Redline format.

Built for lawyers to keep

A redline is a deliverable, not a diff. The PDF is the record a lawyer keeps and sends: the changes between two drafts exactly as they stood, and the same pages in your app, in Slack, in an email and on paper. Start your integration with it, and add the interactive HTML redline beside it where your people work through the changes. Why the PDF

“Beautiful redlines matter to a law firm as a business. When we present to a company, we want polished deliverables, and Version Story’s PDF comparisons embed right in our client portal.”
Vector Legal

Comparisons powered byVersion Story

Mitch DuncombeCEO of Vector Legal
Headshot of Mitch Duncombe

For logic that acts on the changes, such as counting them or flagging a clause, the same redline comes as JSON.

And here is how the five formats compare, for lawyers, for agents, and for code:

Capability.pdf.html.docx.md.json
The same pages everywhere: your app, an email, Slack, paper
Opens in Word or any PDF viewer
Rendered visual redline (color, strikethrough)
Interactive inside your own app (next change, filters, cards)
Preserves tables, moves, cross-references
An AI assistant can read it directly
Compact enough to read in full, even for long documents
Parses in your own code, with no markup to strip
Every change located structurally, with a stable paragraph id
Reference

Everything Else
Is In The Docs

Every endpoint, request and response shape, parameter, limit, and error code lives in the developer documentation. It is written against the code, so it is the copy that stays current.

Two lawyers look out over the city from a corner office

Get started

Test it yourself

Register, create a key, and generate your first redline today. Free to start, no sales call required.