---
title: "Update public link"
method: PATCH
path: "/documents/{document}/public-link"
tags: ["Document Operations"]
---

# Update public link

`PATCH /documents/{document}/public-link`

<small>Requires an API token with the **Document Manager** role.</small>

Updates the [document's](/#documents) active [public link](/#shareable-links). The link URL never changes;
to get a fresh URL, delete the link and create a new one.

Returns a `404` response when the document has no active public link.

## Path parameters

- `document` string, required

## Request body

- UpdatePublicLinkRequest
  - `expires_at` string, date-time, nullable — When the link stops working. Pass `null` for a link that never expires

## Response `200`

`ShareableLinkResource`

- object
  - `data` ShareableLinkResource, required
    - `uuid` string, required
    - `url` string, required — The link URL. Treat it like a secret: anyone who has the URL can access the document with it
    - `expires_at` string, date-time, nullable, required — When the link stops working. `null` means the link never expires
    - `message` string, nullable, required — A personal message shown when the link is opened. Always `null` for public links
    - `created_at` string, date-time, nullable, required

## Other responses

- `401` — Unauthenticated
- `403` — Authorization error
- `404` — Not found
- `422` — Validation error

---

[API](https://skmtc.dev/fynk/apis/fynk-api-reference.md) · [All operations](https://skmtc.dev/fynk/apis/fynk-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fynk/fynk-api-reference/revisions/9657a6757f59/schema)
