---
title: "Add a new version"
method: POST
path: "/documents/{id}/versions"
tags: ["Documents"]
---

# Add a new version

`POST /documents/{id}/versions`

## Request

- Base URL: `https://dataroom.corgi.com/api/v1`
- URL: `https://dataroom.corgi.com/api/v1/documents/{id}/versions`
- Auth: HTTP bearer

Upload a new version of an existing document (keeps its id and share links). Send `multipart/form-data` (`file`, `name?`) or JSON `{ contentBase64, name?, contentType? }`. Max 100 MB; requires a `Content-Length` header. Scope: `documents:write`.

## Path parameters

- `id` string, required

## Request body

- object
  - `contentBase64` string, required
  - `name` string
  - `contentType` string
  - `pageCount` integer

## Response `201`

Version created

## Other responses

- `404`: Not found
- `411`: Content-Length required
- `413`: Too large

---

[API](https://skmtc.dev/corgi/apis/dataroom-api.md) - [All operations](https://skmtc.dev/corgi/apis/dataroom-api/llms.txt) - [OpenAPI document](https://skmtc.dev/corgi/apis/dataroom-api/revisions/73f75ef04a00?raw)
