{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.elimi.africa/contracts/events/notification.requested.v1.json",
  "title": "notification.requested data",
  "description": "data payload for notification.requested. Emitted by the business service that decides a user needs notifying — Orchestrator does not infer notifications from CAP domain events (§20). Orchestrator skip-dispatches when the user disabled that channel in notification preferences, except auth-critical templates.",
  "type": "object",
  "additionalProperties": false,
  "required": ["userId", "channel", "template", "platform"],
  "properties": {
    "userId": {
      "type": "string",
      "description": "Orchestrator User.id"
    },
    "channel": {
      "type": "string",
      "enum": ["email", "in_app", "sms"]
    },
    "template": {
      "type": "string",
      "description": "Notification template key"
    },
    "data": {
      "type": "object",
      "description": "Template interpolation variables",
      "additionalProperties": true
    },
    "platform": {
      "type": "string",
      "examples": ["cap", "lms", "workmasters", "orchestrator"]
    }
  }
}
