{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bewary/json-schema/bewary-webhook-created-schema.json",
  "title": "WebhookCreated",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bewary-openapi.json#/components/schemas/WebhookCreated",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "description": "whk_ + a ULID."
    },
    "url": {
      "type": "string",
      "title": "Url"
    },
    "event_types": {
      "items": {
        "type": "string",
        "enum": [
          "domain.ip_changed",
          "domain.ns_changed",
          "domain.down",
          "domain.up",
          "domain.parked",
          "domain.listed",
          "domain.delisted",
          "domain.reregistered",
          "domain.expiring",
          "domain.expired",
          "domain.held",
          "phone.listed",
          "phone.delisted",
          "wallet.listed",
          "wallet.delisted",
          "wallet.sanctioned",
          "brand.lookalike_registered",
          "brand.lookalike_cert",
          "brand.lookalike_live"
        ]
      },
      "type": "array",
      "title": "Event Types",
      "description": "Empty: every event."
    },
    "status": {
      "type": "string",
      "enum": [
        "enabled",
        "disabled"
      ],
      "title": "Status"
    },
    "disabled_reason": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "failing",
            "app_disconnected"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Disabled Reason",
      "description": "failing: every delivery failed for 5 days; app_disconnected: the app that made it over OAuth was disconnected (1.8.0). POST .../enable turns it back on."
    },
    "created_at": {
      "type": "string",
      "title": "Created At"
    },
    "last_success_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Success At"
    },
    "last_failure_at": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Failure At"
    },
    "failing_since": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Failing Since",
      "description": "The first failed attempt since the last success."
    },
    "secret": {
      "type": "string",
      "title": "Secret",
      "description": "whsec_...: signs every delivery (EVENTS.md). Shown once."
    }
  },
  "type": "object",
  "required": [
    "id",
    "url",
    "event_types",
    "status",
    "created_at",
    "secret"
  ]
}