documents

Get Document

A document and every version of it, in index order. Each version has its version_id, index (its position, counted from 0), label (v1, v2, v2(a) for competing drafts: the label the user names versions by), name, author, description, parents, and files: clean, the document as of that version, and, after the first, comparison, its redline against the version before it. A comparison of two versions is that redline when one follows the other; any other pair is a POST /v1/compare of the two.

get/v1/documents/{document_id}

Request

  • Base URL
    https://api.versionstory.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.versionstory.com/v1/documents/{document_id}
  • Auth
    HTTP bearer

Path parameters

document_idstring required

The Document's document_id, a UUID.

Query parameters

formatstring[] nullable

The formats of every file the answer carries, each version's file and its redline: docx (default), pdf, md, json, html; repeatable or comma-separated, each as GET /v1/files/{file_id} serves it. A file that is not served in a format asked for lists it in its failed_formats.

Headers

X-Customer-Idstring nullable

Id of one of your customers (created in the developer dashboard) to attribute this request's credit usage to. Billing and limits stay organization-wide.

Response

Successful Response

document_idstring required

The Document's id.

namestring nullable

The Document's name: the name it was given, else its first file's.

version_countinteger required

How many versions it has.

created_atstring nullable

When the Document was made: ISO 8601 in UTC, to the second: 2026-10-21T18:22:31Z.

updated_atstring nullable

When the Document last changed: ISO 8601 in UTC, to the second: 2026-10-21T18:22:31Z.

metadataobject

Your own string values by key, stored and returned as they were sent.

Changes

No recorded changes to this operation across all 1 revision of this API.