# Link a file to a record

Show one file on one more record, beside the record it is filed on: send the record's page as definitionKey (its key, like "deals" or a board's "board-…") and the record as rowId. Answers the file with its links. The caller must be able to open the file and edit that record (on a board, the write level); a record they cannot reach is a 404. Linking the record the file is already filed on, or one already linked, changes nothing. The file's bytes are not copied — every link shows the same file.

Access class: `workspace`.

## Endpoint

`POST /v1/files/{id}/links`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "definitionKey": "string",
  "rowId": ""
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "contentType": "string",
    "createdAt": "2026-01-01T00:00:00Z",
    "documentType": "string",
    "folderId": "",
    "id": "",
    "landedAt": "2026-01-01T00:00:00Z",
    "landingFailed": true,
    "links": [
      {
        "definitionKey": "string",
        "id": "",
        "label": "string",
        "rowId": ""
      }
    ],
    "name": "string",
    "no_advertising": true,
    "periodEnd": "string",
    "periodStart": "string",
    "rowId": "",
    "sizeBytes": 1,
    "source": "string",
    "sourceDetail": "string",
    "source_provider": "string",
    "starred": true,
    "statementStatus": "string",
    "submissionUnavailableReason": "string",
    "uploadedBy": 1
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
