{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/transmitly-io/json-schema/transmitly-io-deliverability-audit-schema.json",
  "title": "DeliverabilityAudit",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/transmitly-io-deliverability-api-openapi.yml#/components/schemas/DeliverabilityAudit",
  "type": "object",
  "properties": {
    "domains": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DomainAudit"
      }
    },
    "ips": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/IPAudit"
      }
    },
    "zones": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "checked_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "AuditItem": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "pass",
            "warn",
            "fail",
            "info"
          ]
        },
        "detail": {
          "type": "string"
        },
        "fix": {
          "type": "string"
        }
      }
    },
    "BlocklistCheck": {
      "type": "object",
      "properties": {
        "zone": {
          "type": "string"
        },
        "listed": {
          "type": "boolean"
        },
        "response": {
          "type": "string"
        },
        "error": {
          "type": "string"
        },
        "checked_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "DomainAudit": {
      "type": "object",
      "properties": {
        "domain_id": {
          "type": "string"
        },
        "domain": {
          "type": "string"
        },
        "org_name": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "pass",
            "warn",
            "fail"
          ]
        },
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AuditItem"
          }
        },
        "checked_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "IPAudit": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "ip": {
          "type": "string"
        },
        "node": {
          "type": "string"
        },
        "hostname": {
          "type": "string"
        },
        "ptr_verified": {
          "type": "boolean"
        },
        "spf_verified": {
          "type": "boolean"
        },
        "blocklists": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BlocklistCheck"
          }
        },
        "impact": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "pass",
            "warn",
            "fail"
          ]
        }
      }
    }
  }
}