{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/contabo/json-schema/contabo-domain-create-request-schema.json",
  "title": "DomainCreateRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/contabo-domains-api-openapi.yml#/components/schemas/DomainCreateRequest",
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "description": "Domain name"
    },
    "authCode": {
      "type": "string",
      "description": "The domain auth code"
    },
    "handles": {
      "description": "The handles of the domain",
      "allOf": [
        {
          "$ref": "#/$defs/DomainHandles"
        }
      ]
    },
    "nameservers": {
      "description": "Nameservers",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Nameserver"
      }
    },
    "resourceType": {
      "type": "string",
      "enum": [
        "instance",
        "server",
        "package"
      ],
      "description": "The identifier of the resource type"
    },
    "resourceId": {
      "type": "string",
      "description": "The identifier of the resource id"
    }
  },
  "required": [
    "domain",
    "handles",
    "nameservers"
  ],
  "$defs": {
    "DomainHandles": {
      "type": "object",
      "properties": {
        "owner": {
          "type": "string",
          "description": "Domain's owner handle"
        },
        "admin": {
          "type": "string",
          "description": "Domain's admin handle"
        },
        "tech": {
          "type": "string",
          "description": "Domain's tech handle"
        },
        "zone": {
          "type": "string",
          "description": "Domain's zone handle"
        }
      },
      "required": [
        "owner",
        "admin",
        "tech",
        "zone"
      ]
    },
    "Nameserver": {
      "type": "object",
      "properties": {
        "hostname": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Nameservers"
        },
        "ipV4": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "IPv4 of nameserver"
        },
        "ipV6": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "IPv6 of nameserver"
        }
      },
      "required": [
        "hostname"
      ]
    }
  }
}