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

# Add a custom domain

`POST /domains`

## Request

- Base URL: `https://api.warplink.app/v1`
- URL: `https://api.warplink.app/v1/domains`
- Auth: HTTP bearer

## Request body

- object
  - `domain` string, required: Must be a subdomain such as links.yourapp.com. Root domains, IP addresses and reserved domains (aplnk.to, warplink.app) are not allowed.

## Response `201`

Domain created

- Domain
  - `id` string, uuid
  - `org_id` string, uuid
  - `domain` string
  - `verified` boolean
  - `ssl_status` string
  - `verification_token` string
  - `verified_at` string, date-time, nullable
  - `claimed_at` string, date-time, nullable: Set when this organization proved DNS control and won the exclusive claim on this domain. Null for a pending, unproven claim.
  - `serving_state` 'active' | 'grace' | 'inactive': Computed from the plan and any trial grace window.
  - `grace_until` string, date-time, nullable: Present only while serving_state is grace.
  - `is_trial` boolean: True for a free-tier trial domain.
  - `trial_ends_at` string, date-time, nullable: The trial's hard end date. Null when the domain is not a trial.
  - `trial_data_reset_at` string, date-time, nullable: The next monthly analytics reset for a trial domain. Null when the domain is not a trial.
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `403`: Forbidden, plan upgrade required, or domain limit exceeded
- `409`: Domain already registered

---

[API](https://skmtc.dev/warplink/apis/warplink-api.md) · [All operations](https://skmtc.dev/warplink/apis/warplink-api/llms.txt) · [OpenAPI document](https://skmtc.dev/warplink/apis/warplink-api/revisions/2a90ae8c44e8?raw)
