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

# Create public link

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

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

Creates a [public link](/#shareable-links) for the [document](/#documents). Anyone who has the link URL can
view the document with it, so treat the URL like a secret.

A document has at most one active public link at a time; if one already exists, a `409` response is
returned. Delete the existing link first to create a new one with a fresh URL.

> **Note:** Public links cannot be created while the document is in the `draft` or `approved_draft` stage.
> Attempting to do so will return a `409` response.

## Path parameters

- `document` string, required

## Request body

- StorePublicLinkRequest
  - `expires_at` string, date-time, nullable — When the link stops working. Defaults to 3 months from now; pass `null` for a link that never expires

## Response `201`

`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
- `409` — The resource's current state prevents the requested change
- `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)
