# Get a document link

> GET /api/public/v1/documents/{id}/link, scope loads.read. Techvia TMS public API v1 reference.

Source: https://techvia.software/docs/tms/reference/documents/get-a-document-link/

`GET /api/public/v1/documents/{id}/link`

**Scope:** `loads.read` (`RateCon` and `CarrierInvoice` documents: also `loads.rates`). **MCP tool:** `get_document_link`. Rules and edge cases: [Load documents guide](/docs/tms/guides/loads/).

## Parameters

| Name | In | Type | Required | Notes |
|---|---|---|---|---|
| `id` | path | string (uuid) | yes |  |

## Responses

| Status | Meaning | Body |
|---|---|---|
| `200` | OK | `PublicDocumentLink` |
| `404` | Not Found | `ProblemDetails` |

### `200` body

| Field | Type | Notes |
|---|---|---|
| `url` | string |  |
| `expiresAt` | string (date-time) |  |

Errors are RFC 7807 problem details; see [Errors](/docs/tms/concepts/errors/).

**Example request**

**curl**

```bash
curl "https://tms-api.techvia.software/api/public/v1/documents/$ID/link" \
  -H "Authorization: Bearer $TMS_KEY"
```

**JavaScript**

```js
const id = '...'; // from a list or read call
const res = await fetch(`https://tms-api.techvia.software/api/public/v1/documents/${id}/link`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.TMS_KEY}`,
  },
});
if (!res.ok) throw new Error(await res.text());
console.log(await res.json());
```

**Python**

```python

id = "..."  # from a list or read call
res = requests.request(
    "GET",
    f"https://tms-api.techvia.software/api/public/v1/documents/{id}/link",
    headers={"Authorization": f"Bearer {os.environ['TMS_KEY']}"},
)
res.raise_for_status()
print(res.json())
```

**Example response** `200`

```json
{
  "url": "https://files.example.com/pod-LD-2026-000123.pdf?X-Amz-Expires=120&X-Amz-Signature=...",
  "expiresAt": "2026-12-02T18:20:00+00:00"
}
```

<p class="ep-caption">Illustrative values. Illustrative URL. The link lives 2 minutes at most; treat it as a secret.</p>
