---
title: "Delete Version"
method: DELETE
path: "/v1/documents/{document_id}/versions/{version_id}"
tags: ["documents"]
---

# Delete Version

`DELETE /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

Delete a version from a document's history when the user asks ("delete v2(b)"). Its file and redline go with it. A
version that later versions follow cannot be deleted until they are. Match the user's "v2" to a label in your
earlier results.

## Path parameters

- `version_id` string, required: The version's version_id, a UUID, or "latest" for the Document's newest version.
- `document_id` string, required: The Document's document_id, a UUID.

## Headers

- `X-Customer-Id` string, 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 `200`

Successful Response

- DeletedVersionResponse
  - `deleted` boolean: true: it is deleted.
  - `document_id` string, required: The Document the version left.
  - `version` RemovedVersion, required
    - `version_id` string, required: The id of a version that left the history; it has no index or label any more.
  - `message` string, nullable: What to do next.

## Other responses

- `400`: The request is invalid: INVALID_REQUEST when a parameter or the body fails validation, otherwise the code of the operation's own refusal.

---

[API](https://skmtc.dev/versionstory/apis/version-story-public-api.md) - [All operations](https://skmtc.dev/versionstory/apis/version-story-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/versionstory/apis/version-story-public-api/revisions/994ce15faf32?raw)
