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

# Create a domain

`POST /domains`

## Request

- Base URL: `https://api.short.io`
- URL: `https://api.short.io/domains`
- Auth: API key in header `Authorization`

## Request body

- object
  - `hostname` string, idn-hostname, required: Domain hostname
  - `hideReferer` boolean: Strip referer header on redirect
  - `linkType` 'increment' | 'random' | 'secure' | 'four-char' | 'eight-char' | 'ten-char': Default link type for the domain
  - `teamId` integer: Team to create the domain in. Required for non-admin organization members; optional for organization admins.

## Response `200`

Default Response

- object
  - `id` integer, required: Domain ID
  - `hostname` string, hostname, required
  - `unicodeHostname` string, fqdn, required
  - `state` 'extra_records' | 'not_registered' | 'configured' | 'not_configured' | 'registration_pending' | 'not_verified', required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `TeamId` integer, nullable
  - `OrganizationId` string, uuid, nullable
  - `hasFavicon` boolean, required
  - `faviconURL` string, uri, nullable, required
  - `segmentKey` string, nullable
  - `posthogProjectApiKey` string, nullable
  - `posthogHost` string, iri, nullable
  - `hideReferer` boolean, required
  - `linkType` 'increment' | 'random' | 'secure' | 'four-char' | 'eight-char' | 'ten-char', required
  - `cloaking` boolean, required: Enable cloaking for all links on the domain
  - `hideVisitorIp` boolean, required: Don't store visitor IPs in our database
  - `enableAI` boolean, required: Enable AI for all links on the domain
  - `httpsLevel` 'none' | 'redirect' | 'hsts', required
  - `httpsLinks` boolean, nullable, required
  - `webhookURL` string, iri, nullable
  - `integrationGA` string, nullable
  - `integrationFB` string, nullable
  - `integrationTT` string, nullable
  - `integrationAdroll` string, nullable
  - `integrationGTM` string, nullable
  - `clientStorage` object, nullable, required
  - `caseSensitive` boolean, required
  - `incrementCounter` string, required
  - `robots` 'allow' | 'disallow' | 'noindex', required
  - `sslCertExpirationDate` string, date-time, nullable
  - `sslCertInstalledSuccess` boolean, nullable
  - `domainRegistrationId` integer, nullable
  - `registrationExpiresAt` string, date-time, nullable: When the registration of a domain bought through us expires, null for external domains
  - `registrationAutoRenew` boolean, nullable: Whether the registration renews itself before it expires, null for external domains. When true, an upcoming expiry needs no action from the customer
  - `exportEnabled` boolean, required
  - `enableConversionTracking` boolean, required
  - `qrScanTracking` boolean, required
  - `preventScraping` 'none' | 'all', required: "all" requires every visitor to pass a proof-of-work check before the link resolves. That blocks scrapers, and also link previews, crawlers and any other client that does not run JavaScript.
  - `dnsConfigDeprecated` boolean, required

## Other responses

- `402`: Default Response
- `403`: Default Response
- `409`: Default Response

---

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