---
title: "Preflight a domain before adding it"
method: GET
path: "/v1/domains/preflight"
tags: ["Domains"]
---

# Preflight a domain before adding it

`GET /v1/domains/preflight`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/domains/preflight`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.spacefast.com/v1/auth/oauth2/authorize`, token URL `https://api.spacefast.com/v1/auth/oauth2/token`; client credentials, token URL `https://api.spacefast.com/v1/auth/oauth2/token`, scopes: `domains:write`)

Canonicalizes the hostname and returns an advisory hostability verdict. A negative verdict usually means the domain is already in use with another host — it can still be added and claimed with a TXT ownership proof, so treat the verdict as a warning, not a block.

## Query parameters

- `name` string, required: Apex or concrete hostname to preflight; canonicalized server-side.
- `teamId` string: Team the domain would be added to. Defaults the same way `POST /v1/domains` does.

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` object, required
    - `name` string, required: Canonical lowercase ASCII form of the requested hostname.
    - `unicodeName` string: Read-only U-label form, present only when it differs from `name`.
    - `kind` 'hostname' | 'apex', required: Whether the name is the registrable domain itself or a hostname under one. Decided server-side against the Public Suffix List, so `example.co.uk` is an apex and `www.example.com` is not.
    - `canHost` boolean, nullable, required: Provider hostability verdict. `null` when the provider check was unavailable; treat as unknown, not as failure.
    - `providerMessage` string, nullable, required: Provider-reported reason when the verdict is negative.

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

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