---
title: "Update a short link"
method: PUT
path: "/short-links/{id}"
tags: ["Short links"]
---

# Update a short link

`PUT /short-links/{id}`

## Request

- Base URL: `https://api.multi-upload-tool.com/api/v1`
- URL: `https://api.multi-upload-tool.com/api/v1/short-links/{id}`
- Auth: API key in header `x-api-key`

Replaces the link's details and routing rules.

## Request body

- ShortLinkRequest
  - `url` string, uri, required: Default destination.
  - `slug` string: Custom path. Generated when omitted.
  - `domainId` integer: Custom domain to serve the link from.
  - `title` string
  - `description` string
  - `imageUrl` string, uri
  - `useDeeplink` boolean: Open the destination in the target app rather than a browser.
  - `botProtection` boolean: Send detected bots to `safeUrl` instead.
  - `safeUrl` string, uri
  - `rules` ShortLinkRule[]
    - `type` 'geo' | 'device' | 'language' | 'time' | 'referer', required
    - `destination` string, uri, required
    - `countryCodes` string: Comma-separated ISO 3166-1 alpha-2 codes.
    - `languages` string
    - `devices` string
    - `referers` string
    - `startTime` string
    - `endTime` string
    - `days` string
    - `timezone` string
    - `priority` integer
    - `useDeeplink` boolean
    - `isActive` boolean

## Response `200`

The updated short link.

- object
  - `success` unknown
  - `data` ShortLink
    - `id` integer
    - `slug` string
    - `url` string, uri
    - `shortUrl` string, uri: The full short URL, on the default or custom domain.
    - `title` string, nullable
    - `description` string, nullable
    - `imageUrl` string, uri, nullable
    - `domainId` integer, nullable
    - `useDeeplink` boolean
    - `botProtection` boolean
    - `safeUrl` string, uri, nullable
    - `clicks` integer
    - `rules` ShortLinkRule[]
      - `type` 'geo' | 'device' | 'language' | 'time' | 'referer', required
      - `destination` string, uri, required
      - `countryCodes` string: Comma-separated ISO 3166-1 alpha-2 codes.
      - `languages` string
      - `devices` string
      - `referers` string
      - `startTime` string
      - `endTime` string
      - `days` string
      - `timezone` string
      - `priority` integer
      - `useDeeplink` boolean
      - `isActive` boolean
    - `createdAt` string, date-time

## Other responses

- `400`: The request body or parameters were rejected.
- `401`: The API key is missing, invalid, revoked or expired.
- `404`: No such resource, or it does not belong to the caller.
- `429`: Too many requests for this endpoint group.

---

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