---
title: "Update a short link"
method: PATCH
path: "/link/{link_id}/update/"
tags: ["Short links"]
---

# Update a short link

`PATCH /link/{link_id}/update/`

## Request

- Base URL: `https://hovercode.com/api/v2`
- URL: `https://hovercode.com/api/v2/link/{link_id}/update/`
- Auth: API key in header `Authorization`

Update `link`, `display_name` or `gps`.

## Path parameters

- `link_id` string, uuid, required

## Request body

- object
  - `link` string
  - `display_name` string
  - `gps` boolean

## Response `200`

OK

- Link
  - `id` string, uuid, required
  - `link` string, required: Destination URL.
  - `link_type` 'Link'
  - `display_name` string, nullable
  - `short_url` string, uri, nullable, required
  - `slug` string, nullable
  - `domain` string, nullable
  - `total_clicks` integer
  - `unique_clicks` integer
  - `png` string, uri, nullable
  - `created` string, date-time, required
  - `gps` boolean
  - `svg` string: The short link's QR code as inline SVG.

## Other responses

- `400`: Validation error.
- `401`: Missing or invalid API token.
- `404`: Not found, or not in a workspace you belong to.
- `415`: Request body was not JSON.
- `429`: Rate limit exceeded. Wait `Retry-After` seconds before retrying.

---

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