**Source URL:** https://limited.veevavault.dev/medical/vault-api/api-reference/21.1/documents/document-relationships/create-single-document-relationship.md

# Create Single Document Relationship



<Aside>If you need to create a relationship on more than one document, it is best practice to use the [bulk API](/vault-api/api-reference/21.1/documents/document-relationships/create-multiple-document-relationships).

</Aside>
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](https://platform.veevavault.help/en/lr/21330).

<Endpoint path="/api/{version}/objects/documents/{document\_id}/versions/{major\_version\_number\_\_v}/{minor\_version\_number\_\_v}/relationships" method="POST"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Content-Type` | `application/x-www-form-urlencoded` |
| `Accept` | `application/json` (default) or `application/xml` |
</FieldTable>

## URI Path Parameters {#uri-path-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `{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. |
</FieldTable>

## Body Parameters {#body-parameters}

<FieldTable>
| Field Name | Description |
| --- | --- |
| `target_doc_id__v` | The document `id` of the target document. |
| `relationship_type__v` | The relationship type retrieved from the Document Relationships Metadata call above. |
| `target_major_version__v` | Optional: The major version number of the target document to which the source document will be bound. |
| `target_minor_version__v` | Optional: The minor version number of the target document to which the source document will be bound. |
</FieldTable>

## Request {#request}

<CodeExample title="">
```
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/v15.0/objects/documents/548/versions/0/1/relationships

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
    "responseStatus": "SUCCESS",
    "responseMessage": "Document relationship successfully created.",
    "id": 200
}

```
</CodeExample>

## Response Details {#response-details}

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



---

**Previous:** [Retrieve Document Relationships](/medical/vault-api/api-reference/21.1/documents/document-relationships/retrieve-document-relationships)  
**Next:** [Create Multiple Document Relationships](/medical/vault-api/api-reference/21.1/documents/document-relationships/create-multiple-document-relationships)