---
title: "Update a link's lifetime and/or password"
method: PATCH
path: "/api/links/{token}"
---

# Update a link's lifetime and/or password

`PATCH /api/links/{token}`

## Request

- Base URL: `https://powerpoint-sucks.com`
- URL: `https://powerpoint-sucks.com/api/links/{token}`
- Auth: HTTP bearer

ttlHours resets expiry to now + ttlHours; password null clears the password. Expired links cannot be updated.

## Path parameters

- `token` string, required

## Request body

- UpdateLink
  - `ttlHours` integer
  - `password` string, nullable

## Response `200`

Updated link

- object
  - `link` Link, required
    - `token` string, required
    - `uploadId` string, required
    - `expiresAt` integer, required
    - `hasPassword` boolean, required
    - `tinyUrl` string, nullable, required
    - `createdAt` string, required
    - `expired` boolean, required

## Other responses

- `400`: Invalid request body
- `401`: Missing or invalid token
- `403`: Token lacks the decks/write scope
- `404`: Link not found or expired

---

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