{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dmarc-examiner-com/json-schema/dmarc-examiner-com-alert-schema.json",
  "title": "Alert",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dmarc-examiner-com-openapi.yaml#/components/schemas/Alert",
  "type": "object",
  "required": [
    "id",
    "type",
    "severity",
    "title",
    "description",
    "status",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "domain_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Domain the alert belongs to. Null for organization-level alerts."
    },
    "domain_name": {
      "type": [
        "string",
        "null"
      ]
    },
    "type": {
      "type": "string",
      "enum": [
        "dmarc_fail",
        "new_sender",
        "volume_spike",
        "dns_change",
        "compliance_drop"
      ],
      "description": "- `dmarc_fail`: DMARC authentication failures\n- `new_sender`: New mail sender detected\n- `volume_spike`: Unusual increase in email volume\n- `dns_change`: DNS record changes detected\n- `compliance_drop`: Compliance dropped below threshold\n"
    },
    "severity": {
      "type": "string",
      "enum": [
        "info",
        "warning",
        "critical"
      ]
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ],
      "description": "Additional context data (varies by alert type).",
      "additionalProperties": true
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "sent",
        "dismissed"
      ],
      "description": "- `pending`: Alert created, not yet sent\n- `sent`: Notification sent to user\n- `dismissed`: Dismissed by user\n"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "sent_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  }
}