{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cm-com/json-schema/cm-com-configuration-domain-config-response-schema.json",
  "title": "Configuration_DomainConfigResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cm-com-domains-api-openapi.yml#/components/schemas/Configuration_DomainConfigResponse",
  "required": [
    "message",
    "status"
  ],
  "type": "object",
  "properties": {
    "domainConfig": {
      "$ref": "#/$defs/Configuration_DomainConfig"
    },
    "status": {
      "$ref": "#/$defs/Configuration_StatusCode"
    },
    "message": {
      "type": [
        "string",
        "null"
      ]
    },
    "success": {
      "type": "boolean"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Configuration_DnsRecord": {
      "required": [
        "host",
        "purpose",
        "type",
        "value"
      ],
      "type": "object",
      "properties": {
        "host": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": [
            "string",
            "null"
          ]
        },
        "value": {
          "type": [
            "string",
            "null"
          ]
        },
        "purpose": {
          "type": [
            "string",
            "null"
          ],
          "description": "Either sending (CNAME records) or receiving (the MX record)."
        },
        "priority": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "MX preference. Null for non-MX records."
        },
        "dnsStatus": {
          "type": "integer",
          "format": "int32",
          "description": "1 not verified yet, 2 verified, 3 verification ran and failed."
        }
      },
      "additionalProperties": false
    },
    "Configuration_DomainConfig": {
      "required": [
        "domain"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int32"
        },
        "accountId": {
          "type": "string",
          "format": "uuid"
        },
        "domain": {
          "type": [
            "string",
            "null"
          ]
        },
        "createdOn": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "modifiedOn": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "deletedOn": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "dnsRecords": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Configuration_DnsRecord"
          }
        },
        "isValid": {
          "type": "boolean"
        },
        "clickTracking": {
          "type": "boolean"
        },
        "openTracking": {
          "type": "boolean"
        },
        "sendingEnabled": {
          "type": "boolean",
          "description": "Defaults to true for a new domain."
        },
        "receivingEnabled": {
          "type": "boolean",
          "description": "Defaults to false for a new domain."
        },
        "status": {
          "type": "integer",
          "format": "int32",
          "description": "1 not verified yet, 2 verified, 3 verification ran and failed."
        }
      },
      "additionalProperties": false
    },
    "Configuration_StatusCode": {
      "enum": [
        200,
        400,
        401,
        403,
        404,
        409,
        429,
        500,
        999
      ],
      "type": "integer",
      "format": "int32"
    }
  }
}