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

# Create a link

`POST /links`

## Request

- Base URL: `https://fixed.link/api/v1`
- URL: `https://fixed.link/api/v1/links`
- Auth: HTTP bearer

## Request body

- CreateLinkRequest
  - `destination` string, required: Target URL. https:// is added if omitted.
  - `slug` string: Custom short path. Generated when omitted.
  - `domainId` string, nullable: Custom domain to publish on. Requires a plan with custom domains.
  - `tags` string[]
  - `category` 'marketing' | 'product' | 'documentation' | 'engineering' | 'content' | 'media' | 'social' | 'commerce' | 'events' | 'support' | 'internal' | 'other', nullable: Filed under one of the fixed categories. Left off, AI fills it in.
  - `monitor` boolean: Watch the destination and email when it stops answering. Ignored on a plan without link health checks.

## Response `201`

The created link

- Link
  - `id` string, required
  - `slug` string, required
  - `destination` string, uri, required
  - `shortUrl` string, uri, required
  - `status` 'active' | 'paused' | 'deleted', required
  - `state` 'active' | 'scheduled' | 'expired' | 'paused' | 'deleted', required
  - `clicks` integer, required
  - `tags` string[], required
  - `category` 'marketing' | 'product' | 'documentation' | 'engineering' | 'content' | 'media' | 'social' | 'commerce' | 'events' | 'support' | 'internal' | 'other', nullable, required: One coarse subject from a fixed list. Null when nothing has filed it.
  - `domain` object, nullable, required
    - `id` string, required
    - `hostname` string, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `402`: Link quota reached, or plan lacks API access
- `409`: Slug already taken
- `422`: Invalid destination or slug

---

[API](https://skmtc.dev/fixed/apis/fixedlink-api.md) · [All operations](https://skmtc.dev/fixed/apis/fixedlink-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fixed/apis/fixedlink-api/revisions/72343453b299?raw)
