{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/signicat/main/json-schema/signicat-domain-create-schema.json",
  "title": "DomainCreate",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/signicat-domain-management-openapi.yml#/components/schemas/DomainCreate",
  "required": [
    "domain",
    "domainKind"
  ],
  "type": "object",
  "properties": {
    "domain": {
      "maxLength": 256,
      "minLength": 1,
      "type": "string",
      "description": "FQDN of the domain you want to add."
    },
    "domainKind": {
      "allOf": [
        {
          "$ref": "#/$defs/DomainKind"
        }
      ],
      "description": "Domain kind. See docs for further descriptions."
    },
    "makeDefault": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether this domain should be the default domain for the account."
    },
    "requireMutualTls": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether this domain should only be accessible through mTLS."
    },
    "customerManagedParameters": {
      "allOf": [
        {
          "$ref": "#/$defs/CustomerManagedParametersCreate"
        }
      ],
      "description": "Additional parameters required when `DomainKind=CustomerManaged`.",
      "nullable": true
    }
  },
  "additionalProperties": false,
  "$defs": {
    "CustomDomainCertificateKind": {
      "enum": [
        "LetsEncrypt",
        "Csr",
        "Custom",
        "AcmeEab"
      ],
      "type": "string"
    },
    "CustomerManagedParametersCreate": {
      "required": [
        "certificateKind"
      ],
      "type": "object",
      "properties": {
        "certificateKind": {
          "allOf": [
            {
              "$ref": "#/$defs/CustomDomainCertificateKind"
            }
          ],
          "description": "Certificate kind. See docs for further descriptions."
        },
        "certificateId": {
          "maxLength": 256,
          "minLength": 1,
          "type": [
            "string",
            "null"
          ],
          "description": "ID of certificate to use. Required when `CertificateKind=Custom`."
        },
        "acmeEabServerUrl": {
          "maxLength": 256,
          "minLength": 1,
          "type": [
            "string",
            "null"
          ],
          "description": "Server / Issuer URL to use for ACME EAB. Required when `CertificateKind=AcmeEab`."
        },
        "acmeEabKeyId": {
          "maxLength": 256,
          "minLength": 1,
          "type": [
            "string",
            "null"
          ],
          "description": "Key identifier for ACME EAB. Required when `CertificateKind=AcmeEab`."
        },
        "acmeEabHmacKey": {
          "maxLength": 256,
          "minLength": 1,
          "type": [
            "string",
            "null"
          ],
          "description": "Base64URL encoded HMAC key for ACME EAB. Required when `CertificateKind=AcmeEab`. This field is write-only."
        }
      },
      "additionalProperties": false
    },
    "DomainKind": {
      "enum": [
        "SignicatManaged",
        "CustomerManaged"
      ],
      "type": "string"
    }
  }
}