# Method: projects.locations.documents.documentLinks.create

Create a link between a source document and a target document.

### HTTP request

`POST https://contentwarehouse.googleapis.com/v1/{parent}/documentLinks`

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. Parent of the document-link to be created. parent of document-link should be a document. Format: projects/{projectNumber}/locations/{location}/documents/{source_document_id}. It takes the form `projects/{project}/locations/{location}/documents/{document}`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "documentLink": { object (`https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/DocumentLink`) }, "requestMetadata": { object (`https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/RequestMetadata`) } } ``` |

| Fields ||
|---|---|
| `documentLink` | ``object (`https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/DocumentLink`)`` Required. Document links associated with the source documents (source_document_id). |
| `requestMetadata` | ``object (`https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/RequestMetadata`)`` The meta information collected about the document creator, used to enforce access control for the service. |

### Response body

If successful, the response body contains a newly created instance of `https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/DocumentLink`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `contentwarehouse.documents.update`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).