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 Word document with real tracked changes, a PDF redline, a changed-pages-only PDF, a markdown rendering built for a model to read, and JSON, the same redline shaped for your own code.

“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 redlines 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, plus a JSON rendering for your own code.

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 Word or PDF. Agents get Markdown. Your code gets JSON. All four 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. Every change carries who made it and which draft it came from, so a multi-way redline stays attributable down to the span.

Insertions and deletions
6. The Recipient will <ins author="counsel@firm.com"
   revision="v2 NDA.docx" date="…">promptly </ins>notify the Company of any
   <del author="counsel@firm.com" revision="v2 NDA.docx" date="…">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 code to parse

JSON is the same redline shaped for programs, with no markup to parse and every change located structurally inside its paragraph, so a position is never a text match or a character offset you have to keep in sync. Request it with format=json; the shape is in JSON format.

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

Capability.docx.pdf.md.json
Opens in Word or any PDF viewer
Rendered visual redline (color, strikethrough)
Preserves tables, footnotes, 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.