documents

Patch Document

Rename a document or change its metadata. The answer is the Document.

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.

patch/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.

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 Document's new name.

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'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.