{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mailfixture-com/json-schema/mailfixture-com-domain-schema.json",
  "title": "Domain",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mailfixture-com-openapi.json#/components/schemas/Domain",
  "properties": {
    "created_at": {
      "format": "date-time",
      "type": "string"
    },
    "fqdn": {
      "type": "string"
    },
    "id": {
      "format": "uuid",
      "type": "string"
    },
    "kind": {
      "enum": [
        "shared",
        "custom"
      ],
      "type": "string"
    },
    "mx_ok_at": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "setup": {
      "$ref": "#/$defs/DomainSetup",
      "description": "DNS records to publish; present on creation and on unverified custom domains in lists."
    },
    "verified_at": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "verify_txt_token": {
      "description": "TXT challenge value; null for shared domains.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "fqdn",
    "kind",
    "verify_txt_token",
    "verified_at",
    "mx_ok_at",
    "created_at"
  ],
  "type": "object",
  "$defs": {
    "DomainSetup": {
      "properties": {
        "mx": {
          "properties": {
            "name": {
              "type": "string"
            },
            "priority": {
              "type": "integer"
            },
            "value": {
              "description": "The MX hostname to point at.",
              "type": "string"
            }
          },
          "required": [
            "name",
            "value",
            "priority"
          ],
          "type": "object"
        },
        "txt": {
          "properties": {
            "name": {
              "description": "Record name, `_mfx.<fqdn>`.",
              "type": "string"
            },
            "value": {
              "description": "Record value, `mfx-verify=<token>`.",
              "type": "string"
            }
          },
          "required": [
            "name",
            "value"
          ],
          "type": "object"
        }
      },
      "required": [
        "txt",
        "mx"
      ],
      "type": "object"
    }
  }
}