---
title: "Add a custom domain"
method: POST
path: "/api/v1/domains"
tags: ["Domains"]
---

# Add a custom domain

`POST /api/v1/domains`

Add a new custom domain to your workspace. You must configure a CNAME DNS record pointing to domains.linklyhq.com before adding the domain.

## Request body

- object — POST body for creating a Domain
  - `name` string — name
  - `workspace_id` integer, required — Workspace ID

## Response `200`

Domain

- Domain — Response schema for a domain
  - `name` string, nullable
  - `workspace_id` integer, nullable

## Other responses

- `400` — Error
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/linklyhq/apis/linkly-url-shortener-api.md) · [All operations](https://skmtc.net/linklyhq/apis/linkly-url-shortener-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/linklyhq/linkly-url-shortener-api/revisions/351c1f004617/schema)
