---
title: "Create a short link"
method: POST
path: "/short-links"
tags: ["Short links"]
---

# Create a short link

`POST /short-links`

## Request

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

Creates a trackable short link, optionally with routing rules that send different visitors to different destinations.

## Headers

- `X-Team-ID` integer

## 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 created short link, including its full URL.

- 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.
- `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)
