---
title: "Update one link"
method: PATCH
path: "/api/v1/links/{alias}"
tags: ["Links"]
---

# Update one link

`PATCH /api/v1/links/{alias}`

## Request

- Base URL: `https://workers.miniurl.com`
- URL: `https://workers.miniurl.com/api/v1/links/{alias}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

## Path parameters

- `alias` string, required

## Query parameters

- `domain` string

## Headers

- `Idempotency-Key` string

## Request body

- UpdateLinkRequest
  - `url` string, uri
  - `password` string, nullable
  - `expiration` string, date-time, nullable
  - `activated_at` string, date-time, nullable
  - `dry_run` boolean: OAuth Agent only: preview the update without changing the link.

## Response `200`

Link updated

- CreateLinkResponse
  - `success` boolean, required
  - `data` LinkRecord, required
    - `short_url` string, required
    - `alias` string, required
    - `full_url` string, required
    - `domain` string, required
    - `manage_code` string, nullable
    - `created_at` string, date-time, required
    - `expires_at` string, date-time, nullable
    - `has_password` boolean
    - `clicks` integer
    - `last_clicked_at` string, date-time, nullable
  - `meta` Meta
    - `account_type` string
    - `hint` string
    - `usage` object
    - `notices` object[]
    - `limitations` string[]
    - `upgrade` object

## Other responses

- `400`: Invalid input or malformed JSON
- `401`: Missing, invalid, expired, or wrong bearer token for this endpoint
- `403`: Requires a registered account or a higher plan
- `404`: Requested resource not found

---

[API](https://skmtc.dev/miniurl/apis/miniurl-agent-first-api.md) · [All operations](https://skmtc.dev/miniurl/apis/miniurl-agent-first-api/llms.txt) · [OpenAPI document](https://skmtc.dev/miniurl/apis/miniurl-agent-first-api/revisions/1d12196927db?raw)
