{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pageweave-dev/json-schema/pageweave-dev-domain-schema.json",
  "title": "Domain",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pageweave-dev-openapi.json#/components/schemas/Domain",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "name",
    "workspace_id",
    "website_id",
    "auto_renew",
    "expires_at",
    "deletion_scheduled_at",
    "deletion_kind",
    "released_at",
    "registrar_status",
    "verification_status",
    "transfer_lock",
    "registered_at",
    "last_renewed_at",
    "transfer_status",
    "registrar_managed",
    "status",
    "deletion_status",
    "cancelled",
    "verification_at_risk",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string",
      "description": "Registrable domain name."
    },
    "workspace_id": {
      "type": "string",
      "format": "uuid"
    },
    "website_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Serving website, when the domain was attached to one."
    },
    "auto_renew": {
      "type": "boolean"
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "deletion_scheduled_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Set while any deletion is scheduled (term-end or immediate)."
    },
    "deletion_kind": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "cancellation",
        "immediate",
        null
      ],
      "description": "`cancellation` is a term-end deletion the customer can undo;\n`immediate` is a registrar deletion already ordered, which only a\nrestore can reverse.\n"
    },
    "released_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Set once the domain has left the account while keeping its history."
    },
    "registrar_status": {
      "type": [
        "string",
        "null"
      ],
      "description": "Registrar lifecycle label, e.g. `ACTIVE`."
    },
    "verification_status": {
      "type": [
        "string",
        "null"
      ],
      "description": "Registrar registrant-verification label."
    },
    "transfer_lock": {
      "type": "boolean",
      "description": "Registrar transfer lock. Defaults to locked."
    },
    "registered_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Registry registration date (domain.info crDate)."
    },
    "last_renewed_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Registry date of the last renewal (domain.info reDate)."
    },
    "transfer_status": {
      "type": [
        "string",
        "null"
      ],
      "description": "Registry transfer mode (domain.info transferMode)."
    },
    "registrar_managed": {
      "type": "boolean",
      "description": "True when PageWeave registered the domain and manages it at the registrar."
    },
    "status": {
      "type": "string",
      "enum": [
        "external",
        "active",
        "expired",
        "deletion_scheduled",
        "released"
      ],
      "description": "Normalized local lifecycle state."
    },
    "deletion_status": {
      "type": "string",
      "enum": [
        "none",
        "pending",
        "scheduled",
        "initiated"
      ],
      "description": "`pending` while the emailed confirmation is outstanding,\n`scheduled` once ordered, `initiated` while the registrar executes\nit. `none` without a deletion.\n"
    },
    "cancelled": {
      "type": "boolean",
      "description": "A term-end cancellation is scheduled (undoable). Immediate deletions report false."
    },
    "verification_at_risk": {
      "type": "boolean",
      "description": "The registrant still has to confirm the registrar's email."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}