{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mandiant/json-schema/mandiant-email-rule-wrapped-schema.json",
  "title": "email_rule_wrapped",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/mandiant-email-rules-api-openapi.yml#/components/schemas/email_rule_wrapped",
  "type": "object",
  "properties": {
    "email_rule": {
      "$ref": "#/$defs/email_rule"
    }
  },
  "$defs": {
    "email_rule": {
      "type": "object",
      "required": [
        "regex",
        "rule_type",
        "search_area"
      ],
      "properties": {
        "regex": {
          "type": "string",
          "description": "A string that's interpreted as a regular expression to match in email subject or body.  Must be a valid Ruby regex\n"
        },
        "rule_type": {
          "type": "string",
          "enum": [
            "blocked",
            "error"
          ],
          "description": "Which result to consider as matching this rule"
        },
        "search_area": {
          "type": "string",
          "enum": [
            "body",
            "subject"
          ],
          "description": "Area of email in which to look for matches of the regex parameter"
        }
      }
    }
  }
}