{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.firstmilelabs.com/schemas/webhooks/monitoring.review.dispositioned.v1.json",
  "title": "FirstMileLabs Outbound Webhook — monitoring.review.dispositioned (v1)",
  "description": "An analyst reached a verdict on a review. A \"true_match\" or \"false_positive\" moves the review to awaiting approval by a second person; \"escalate\" hands it to the MLRO. Emitted before any consequences, so the risk re-score (risk.assessed) and any MLRO hand-off (monitoring.review.escalated) follow it.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "event",
    "eventId",
    "eventVersion",
    "timestamp",
    "orgId",
    "caseId",
    "reviewCaseId",
    "alertType",
    "occurrenceNo",
    "disposition",
    "state"
  ],
  "properties": {
    "event": {
      "type": "string",
      "const": "monitoring.review.dispositioned"
    },
    "eventId": {
      "type": "string",
      "format": "uuid"
    },
    "eventVersion": {
      "type": "integer",
      "const": 1
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "orgId": {
      "type": "string"
    },
    "crmRecordId": {
      "type": [
        "string",
        "null"
      ]
    },
    "crmSource": {
      "type": [
        "string",
        "null"
      ]
    },
    "caseId": {
      "type": "string",
      "description": "The monitored customer’s case — the record your CRM holds. Never the review case."
    },
    "reviewCaseId": {
      "type": "string",
      "format": "uuid",
      "description": "The monitoring review case this event is about. Stable across every event for the same review."
    },
    "reviewRef": {
      "type": [
        "string",
        "null"
      ],
      "description": "Human-readable reference for the review, as shown in the review queue."
    },
    "alertType": {
      "type": "string",
      "description": "The monitoring alert that opened the review, e.g. \"sanctions_hit\", \"adverse_media\", \"structure_change\"."
    },
    "severity": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "low",
        "medium",
        "high",
        "critical",
        null
      ]
    },
    "subjectRole": {
      "type": [
        "string",
        "null"
      ],
      "description": "The flagged party’s role on the case, e.g. \"UBO\" or \"Director\". Reviews never carry the party’s name."
    },
    "subjectRef": {
      "type": [
        "string",
        "null"
      ],
      "description": "Where the flagged party sits in the case’s ownership data, e.g. \"ubo_0\", \"dir_1\" or \"company\"."
    },
    "personId": {
      "type": [
        "integer",
        "string",
        "null"
      ],
      "description": "Person-registry id of the flagged party, when they are linked to one."
    },
    "occurrenceNo": {
      "type": "integer",
      "minimum": 1,
      "description": "How many times this same fact has opened a review on this customer. 2+ means it has been reviewed before."
    },
    "disposition": {
      "type": "string",
      "enum": [
        "false_positive",
        "true_match",
        "escalate"
      ]
    },
    "dispositionBy": {
      "type": [
        "string",
        "null"
      ],
      "description": "Email of the analyst who reached the verdict."
    },
    "isReversal": {
      "type": "boolean",
      "description": "True when this confirms a match that a previous occurrence dismissed as a false positive."
    },
    "state": {
      "type": "string",
      "enum": [
        "pending_approval",
        "with_mlro"
      ]
    }
  }
}
