To create a new version of a document, issue a POST request to the document's version URI. The request body should contain the new version's metadata. Binary content is uploaded separately after the version is created (see the upload link in the response).
Request body
<documentVersiontitle="My Document"description="Updated description"versionNote="Added new section"extension="docx"
/>
Response codes
Code
Description
201 Created
Version created. Response body contains the updated Document resource and a Location header pointing to it.
400 Bad Request
Missing or invalid upload headers.
409 Conflict
A lock conflict prevents creating a new version. Response body contains lock details.
Example
Request
POST /files/documents/123/version HTTP/1.1Authorization: Bearer frootymcnooty/vonbootycherootyContent-Type: application/xml<documentVersion title="My Document" description="Updated description" versionNote="Added new section" extension="docx" />
Some clients create auto-save versions of documents. To promote the latest auto-save to a published version, issue a POST request to the document's promote/latest URI.
Response codes
Code
Description
201 Created
Auto-save promoted successfully. Response body contains the updated Document resource.
204 No Content
No auto-save content is available to promote.
409 Conflict
An upload is currently in progress; try again later.
Example
Request
POST /files/documents/123/promote/latest HTTP/1.1Authorization: Bearer frootymcnooty/vonbootycherooty
If the authenticated user can delete a document version, the DocumentVersion contained in the VersionHistory resource will advertise a link with a rel value of delete. To delete the version, issue a DELETE request to that URI.
Response codes
Code
Description
200 OK
Version deleted. Response includes a Link header to the version history and parent document.