Skip to content

Create a new relationship on a document.

You cannot create or delete standard relationship types. Examples of standard relationship types include Based On and Original Source. Learn about document relationships in Vault Help.

POST/api/{version}/objects/documents/{document\_id}/versions/{major\_version\_number\_\_v}/{minor\_version\_number\_\_v}/relationships
NameDescription
Content-Typeapplication/x-www-form-urlencoded
Acceptapplication/json (default) or application/xml
NameDescription
{document_id}The document id field value.
{major_version_number__v}The document major_version_number__v field value.
{minor_version_number__v}The document minor_version_number__v field value.
Field NameDescription
target_doc_id__v
required
The document id of the target document.
relationship_type__v
required
The relationship type retrieved from the Document Relationships Metadata call above.
target_major_version__v
conditional
The major version number of the target document to which the source document will be bound. Required for target version-specific relationships.
target_minor_version__v
conditional
The minor version number of the target document to which the source document will be bound. Required for target version-specific relationships.
curl -X POST -H "Authorization: {SESSION_ID}" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "target_doc_id__v=548" \ -d "relationship_type__v=supporting_documents__vs" \ -d "target_major_version__v=0" \ -d "target_minor_version__v=2" \ https://myvault.veevavault.com/api/v23.2/objects/documents/548/versions/0/1/relationships
{ "responseStatus": "SUCCESS", "responseMessage": "Document relationship successfully created.", "id": 200 }

On SUCCESS, Vault returns the ID of the newly created document relationship.