{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ship-page/json-schema/ship-page-custom-domain-schema.json",
  "title": "CustomDomain",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ship-page-openapi.json#/components/schemas/CustomDomain",
  "type": "object",
  "required": [
    "id",
    "host",
    "address",
    "apex",
    "apexMain",
    "slug",
    "status",
    "records",
    "problem",
    "message",
    "apexOk",
    "apexReady",
    "apexProblem",
    "apexMessage",
    "frozen",
    "pausesAt",
    "endsAt",
    "dnsHost",
    "checkedAt",
    "liveAt",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "host": {
      "type": "string",
      "description": "The name the CNAME goes on; www.<domain> for a registered domain."
    },
    "address": {
      "type": "string",
      "description": "Where the drop lives; the other name of a bare domain redirects here."
    },
    "apex": {
      "type": "boolean",
      "description": "A registered domain: the bare name is served through A and AAAA records."
    },
    "apexMain": {
      "type": "boolean",
      "description": "The bare name is the main address and www redirects to it."
    },
    "slug": {
      "type": [
        "string",
        "null"
      ],
      "description": "The drop it shows; null once that drop is deleted."
    },
    "status": {
      "type": "string",
      "enum": [
        "waiting",
        "securing",
        "live",
        "moved",
        "removed"
      ]
    },
    "records": {
      "type": "array",
      "description": "The DNS records to set, while the domain is active.",
      "items": {
        "type": "object",
        "required": [
          "type",
          "name",
          "value"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "CNAME",
              "A",
              "AAAA"
            ]
          },
          "name": {
            "type": "string",
            "description": "Relative to the zone; @ is the zone itself."
          },
          "value": {
            "type": "string"
          }
        }
      }
    },
    "problem": {
      "type": [
        "string",
        "null"
      ],
      "description": "Why it isn't live yet, or why it ended."
    },
    "message": {
      "type": [
        "string",
        "null"
      ],
      "description": "The problem in a sentence."
    },
    "apexOk": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether the bare name's A and AAAA records are right; null until checked or for subdomains."
    },
    "apexReady": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether the bare name is served; null for subdomains."
    },
    "apexProblem": {
      "type": [
        "string",
        "null"
      ]
    },
    "apexMessage": {
      "type": [
        "string",
        "null"
      ]
    },
    "frozen": {
      "type": "boolean",
      "description": "Taken down with its drop: shows the removed page and can't be changed."
    },
    "pausesAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When it stops showing the drop after the Team plan ended; null while Team is active."
    },
    "endsAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When it is disconnected after the Team plan ended; null while Team is active."
    },
    "dnsHost": {
      "type": [
        "object",
        "null"
      ],
      "description": "Where the domain's DNS is hosted, when we recognise it.",
      "required": [
        "name",
        "url",
        "cloudflare"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "cloudflare": {
          "type": "boolean"
        }
      }
    },
    "checkedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "liveAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}