{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hempdata-io/json-schema/hempdata-io-webhook-create-request-schema.json",
  "title": "WebhookCreateRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/hempdata-io-api-openapi.json#/components/schemas/WebhookCreateRequest",
  "type": "object",
  "properties": {
    "endpoint_url": {
      "type": "string",
      "format": "uri",
      "description": "HTTPS URL to receive webhook payloads"
    },
    "filters": {
      "type": "object",
      "properties": {
        "jurisdictions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "State codes to filter events (empty = all states)"
        },
        "substances": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Substances to filter events"
        },
        "events": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "regulation.created",
              "regulation.updated",
              "regulation.status_changed",
              "regulation.expiring"
            ]
          },
          "description": "Event types to subscribe to"
        }
      }
    }
  },
  "required": [
    "endpoint_url"
  ]
}