Skip to content

Add a new draft version of an existing document. You can choose to either use the existing source file or a new source file. These actions increase the target document’s minor version number. This is analogous to using the Create Draft action in the UI.

Not all documents are eligible for draft creation. For example, you cannot create a draft of a checked-out document. Learn more about creating new draft versions in Vault Help.

POST/api/{version}/objects/documents/{doc_id}
NameDescription
Content-Typemultipart/form-data
Acceptapplication/json (default) or application/xml
NameDescription
{doc_id}The document id field value.
NameDescription
createDraft
conditional
Choose one of the two available values:

latestContent: Create a new draft version from the existing document in the Vault. This does not require uploading a file. This option is only available if both the source file and rendition are each 4 GB or less. This is analogous to the Copy file from current version option in the Create Draft UI.

uploadedContent: Create a new draft version by uploading the document source file. This requires uploading a new source file with an additional file body parameter. The maximum allowed file size is 4GB. This is analogous to the Upload a new file option in the Create Draft UI.

This parameter is only required to create a new draft version from an existing document or by uploading a source file. To create a new version for a placeholder document, you must omit this parameter.
file
conditional
The filepath of the source document. This parameter is only required in the following scenarios:
  • If createDraft=uploadedContent, use this parameter to include the new document source file.
  • If your target document is a placeholder, use this parameter to upload a source file and create a new draft version of the document.
description__v
optional
Add a Version Description for the new draft version. Other users may view this description in the document’s Version History. Maximum 1,500 characters.

Request : Copy file from current version

Section link for Request : Copy file from current version
curl -X POST -H "Authorization: {SESSION_ID}" \ -H "Content-Type: multipart/form-data" \ -F "createDraft=latestContent" \ https://myvault.veevavault.com/api/v24.2/objects/documents/534

Request : Upload a new file & Suppress rendition

Section link for Request : Upload a new file & Suppress rendition
curl -X POST -H "Authorization: {SESSION_ID}" \ -H "Content-Type: multipart/form-data" \ -F "file=CholeCap-Presentation.pptx" \ -F "createDraft=uploadedContent" \ https://myvault.veevavault.com/api/v24.2/objects/documents/534?suppressRendition=true
{ "responseStatus": "SUCCESS", "responseMessage": "New draft successfully created.", "major_version_number__v": 0, "minor_version_number__v": 2 }