documents

Patch Version

Rename a version when the user renames it or its file. Match the user's "v3" to a label in your earlier results. Leave the user's local files as they are.

Send only what changes, {"name"?, "metadata"?}, at least one of them: metadata merges into what is stored, a key sent replacing that key and a key sent as null removing it. The answer is the version.

patch/v1/documents/{document_id}/versions/{version_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}/versions/{version_id}
  • Auth
    HTTP bearer

Path parameters

version_idstring required

The version's version_id, a UUID, or "latest" for the Document's newest version.

document_idstring required

The Document's document_id, a UUID.

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.

Request body

namestring nullable

The version's new name, such as the user's name for its file.

metadataobject nullable

String values by key, merged into what is stored: a key sent is added or replaced, a key sent as null is removed, and a key left out stays.

Response

Successful Response

document_idstring required

The Document the version belongs to.

version_idstring required

The version's id.

indexinteger required

The version's position among its Document's versions in the order they were made, counted from 0: the first version, v1, is index 0. It shows the order and names nothing: deleting a version moves the ones after it down, so a request names a version by its version_id.

labelstring required

The app's label for the version, such as v2, or v2(a) for one of competing drafts, which the user names it by. It comes from the version graph, so a sibling added later can relabel it.

namestring required

The version's name, which the app shows: its own once renamed, else its file's.

authorstring nullable

Who its changes are attributed to: an edit's author, an upload's author_name.

descriptionstring nullable

What changed: an edit's description, an upload's description.

created_atstring required

When the version was made: 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.