{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mailsenpai/json-schema/mailsenpai-webhook-schema.json",
  "title": "Webhook",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mailsenpai-webhooks-api-openapi.yml#/components/schemas/Webhook",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Public https address. Empty = off."
    },
    "eventi": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "delivered",
          "bounce",
          "defer",
          "complaint",
          "open",
          "click",
          "dropped",
          "sent"
        ]
      }
    },
    "attivo": {
      "type": "boolean"
    },
    "segreto": {
      "type": "string",
      "description": "Only in the POST response: `whsec_…`, to verify the signature."
    },
    "tipi_possibili": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ultime_24_ore": {
      "type": "object",
      "properties": {
        "consegnati": {
          "type": "integer"
        },
        "in_attesa": {
          "type": "integer"
        },
        "falliti": {
          "type": "integer"
        }
      }
    }
  }
}