{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/groundmail-dev/json-schema/groundmail-dev-update-webhook-request-schema.json",
  "title": "UpdateWebhookRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/groundmail-dev-webhooks-api-openapi.yml#/components/schemas/UpdateWebhookRequest",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "format": "uri"
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WebhookEventType"
      }
    },
    "enabled": {
      "type": "boolean"
    },
    "tenants": {
      "type": [
        "array",
        "null"
      ],
      "maxItems": 100,
      "items": {
        "type": "string"
      },
      "description": "Only email events of these tenants (`external_id` or `id`). Such an endpoint gets no `email.received`, `contact.*` or `automation.*` events. `[]` or `null` removes the filter (every event).\n"
    }
  },
  "$defs": {
    "WebhookEventType": {
      "type": "string",
      "enum": [
        "email.received",
        "email.sent",
        "email.delivered",
        "email.delivery_delayed",
        "email.held",
        "email.bounced",
        "email.complained",
        "email.opened",
        "email.clicked",
        "email.failed",
        "email.suppressed",
        "email.scheduled",
        "contact.unsubscribed",
        "automation.started",
        "automation.step_completed",
        "automation.completed",
        "automation.failed"
      ]
    }
  }
}