---
title: "Replace the document behind a link (dynamic links)"
method: POST
path: "/api/v1/files/{uuid}/content"
tags: ["Files"]
---

# Replace the document behind a link (dynamic links)

`POST /api/v1/files/{uuid}/content`

## Request

- Base URL: `https://everypage.co`
- URL: `https://everypage.co/api/v1/files/{uuid}/content`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://everypage.co/oauth/authorize`, token URL `https://everypage.co/oauth/token`, scopes: `files:write`)
  - HTTP bearer

Swap the document behind a live link. UUID, short id, slug, QR, settings and readership history survive; `contentVersion` increments and the old file is kept as a revision. Pro plan, owner only. Un-burns a view-limited link; 410 if expired. Multipart, same shape as the upload endpoint (PDF, or Word/PowerPoint converted server-side); `?clearAnchors=false` keeps page-anchored hotspots and notes despite the page mismatch (default clears them).

Accepts the same manage-token bearer lane as the settings endpoint, but since manage tokens act at the free tier, content replacement always answers 403 to them - it remains effectively owner-only.

## Query parameters

- `clearAnchors` boolean

## Response `200`

Content replaced

- ReplaceResult
  - `uuid` string, uuid
  - `contentVersion` integer: The new content version (increments on every in-place replacement).
  - `originalName` string: The stored display name - the uploaded filename, with a `.pdf` extension after an Office conversion.
  - `size` integer: Bytes of the stored PDF.
  - `anchorsCleared` boolean: Whether page-anchored hotspots and notes were cleared (the `clearAnchors` decision).
  - `clearedHotspots` integer: Hotspots removed by the replacement.
  - `clearedNotes` integer: Page-anchored notes removed by the replacement.
  - `message` string

## Other responses

- `400`: Malformed body or multipart, or an invalid value (code `validation_error`).
- `401`: No or invalid API key, OAuth token, manage token or claim token (code `missing_token` or `invalid_token`).
- `403`: Not the owner, a manage-token caller, or a plan below Pro (codes `forbidden` / `plan_required`).
- `404`: Unknown id, or a file you do not own on routes where 404 replaces 403 (code `not_found`).
- `409`: The document was changed by another connection mid-replace (code `conflict`). Retry.
- `410`: The link has expired; expired links refuse replacement content (code `gone`). Burned links are NOT refused - replacing the content is the documented un-burn path.
- `413`: The upload (or the PDF a Word/PowerPoint file converted to) is above your plan's size cap - 20MB Free, 200MB Basic, 2GB Pro - or a JSON body is over its fixed cap (1MB for settings and hotspots, 64KB for variants and claims) (code `payload_too_large`).
- `422`: A Word or PowerPoint file could not be converted to PDF (code `unprocessable`).
- `429`: Over the limit - 120 requests per minute per Authorization value on /api/v1 (webhook test 10/min; the Canva lane 30/min per IP). Code `rate_limited`; wait for `Retry-After`.
- `503`: A dependency (document converter, Canva key verification) is unavailable - retry with backoff (code `service_unavailable`).

---

[API](https://skmtc.dev/everypage/apis/everypage-api.md) · [All operations](https://skmtc.dev/everypage/apis/everypage-api/llms.txt) · [OpenAPI document](https://skmtc.dev/everypage/apis/everypage-api/revisions/e6674f903456?raw)
