---
title: "Update links"
method: PUT
path: "/links"
tags: ["Link"]
---

# Update links

`PUT /links`

Update existing links based on a filter. Updates a single link if the 'id' field is specified in the filter.

## Request body

- UpdateLinksRequest
  - `filter` LinkFilter
    - `id` string, uuid — Unique identifier of the link. Use this to update a specific link.
    - `urlContains` string — Filter links that contain this text in their URL.
  - `link` Link
    - `url` string, uri, required — The URL of the link.
    - `hash` string, required — Unique hash, used as the short link.
    - `describe` string, required — Description of the link.
    - `created_at` string, date-time, required — Timestamp when the link was created.
    - `updated_at` string, date-time, required — Timestamp when the link was last updated.

## Response `200`

Links updated successfully.

- UpdateLinks200Response
  - `updatedCount` integer — The number of links updated.

## Other responses

- `400` — Bad request.
- `404` — Not found.

---

[API](https://skmtc.dev/shortlink-org/apis/shortlink-link-bff.md) · [All operations](https://skmtc.dev/shortlink-org/apis/shortlink-link-bff/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/shortlink-org/shortlink-link-bff/revisions/a5800129f25f/schema)
