---
title: "Verify the custom domain"
method: POST
path: "/status-pages/{statusPage}/custom-domain/verify"
tags: ["Status pages"]
---

# Verify the custom domain

`POST /status-pages/{statusPage}/custom-domain/verify`

## Request

- Base URL: `https://api.spectate.net/v1`
- URL: `https://api.spectate.net/v1/status-pages/{statusPage}/custom-domain/verify`
- Auth: HTTP bearer

Looks up the page's custom domain in DNS. One passing record verifies it: a CNAME to the
page's `cname_target`, or the TXT record from `custom_domain_verification`. A verified
domain stays verified when a later check fails. `routed` tells whether visitors reach the
page; its certificate is issued on the first visit. The page needs a custom domain (`422`
otherwise). Safe to repeat while DNS changes propagate.

## Path parameters

- `statusPage` string, uuid, required

## Response `200`

What DNS returned, and whether the domain is verified.

- StatusPageCustomDomainCheck: The result of looking up a custom domain's DNS records.
  - `domain` string, required: The domain
  - `verified` boolean, required: Whether ownership is proven, now or earlier. A proven domain stays verified when a later check fails
  - `verified_at` string, date-time, nullable, required: When ownership was proven; `null` before
  - `records` StatusPageDnsRecordCheck[], required: The records that can verify the domain; one passing record is enough
    - `type` 'A' | 'AAAA' | 'CNAME' | 'MX' | 'NS' | 'TXT' | 'CAA' | 'SOA', required: The DNS record type a DNS monitor queries.
    - `name` string, required: Record name
    - `expected` string, required: The value it needs
    - `found` string[], required: The values DNS returned; empty when there is no such record
    - `ok` boolean, required: Whether this record passes
  - `routed` boolean, required: Whether visitors reach the page: the domain points at it by CNAME or resolves to the same addresses. The page and its certificate need this; the certificate is issued on the first visit
  - `addresses` string[], required: Addresses the domain resolves to (A and AAAA records)
  - `checked_at` string, date-time, required: When DNS was checked

## Other responses

- `401`: `UNAUTHENTICATED`: no token was sent. `INVALID_TOKEN`: the token is unknown or revoked. `TOKEN_EXPIRED`: the token has expired.
- `403`: `FORBIDDEN`: the token lacks an ability this endpoint requires (listed in `details.required_abilities`). `TEAM_PENDING_DELETION`: the team is scheduled for deletion. `TEAM_SUSPENDED`: Spectate suspended the team.
- `404`: `RESOURCE_NOT_FOUND`: there is no such resource in this team.
- `422`: `VALIDATION_FAILED`: the request is invalid; `details.errors` lists the fields.
- `429`: `RATE_LIMITED`: too many requests for this token. Wait for the number of seconds in `Retry-After`.

---

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