{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/firma-dev/main/json-schema/firma-dev-webhook-schema.json",
  "title": "Webhook",
  "x-generated": "2026-09-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/firma-dev-webhooks-api-openapi.yml#/components/schemas/Webhook",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier for the webhook"
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Webhook URL"
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "Webhook description"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Events that trigger this webhook"
    },
    "enabled": {
      "type": "boolean",
      "description": "Whether the webhook is enabled"
    },
    "consecutive_failures": {
      "type": "integer",
      "description": "Number of consecutive delivery failures"
    },
    "auto_disabled_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Timestamp when the webhook was auto-disabled due to failures"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Webhook creation timestamp"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Webhook last update timestamp"
    }
  },
  "required": [
    "id",
    "url",
    "events",
    "enabled",
    "created_at"
  ]
}