{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/frihet-io/json-schema/frihet-io-webhook-create-schema.json",
  "title": "WebhookCreate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/frihet-io-webhooks-api-openapi.yml#/components/schemas/WebhookCreate",
  "type": "object",
  "required": [
    "name",
    "url",
    "events"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Webhook name",
      "maxLength": 200
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Endpoint URL to receive webhook events",
      "maxLength": 2000
    },
    "secret": {
      "type": "string",
      "description": "HMAC secret for verifying webhook signatures. Write-only: echoed once in the create response, never returned by read endpoints (see hasSecret).",
      "maxLength": 500
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100,
        "x-enum-ref": "#/components/schemas/WebhookEventType"
      },
      "minItems": 1,
      "description": "List of event types to subscribe to"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ],
      "default": "active"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true,
      "description": "Arbitrary metadata to attach to the webhook"
    }
  }
}