{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/infivoice/json-schema/infivoice-create-webhook-request-schema.json",
  "title": "CreateWebhookRequest",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/infivoice-openapi.json#/components/schemas/CreateWebhookRequest",
  "type": "object",
  "required": [
    "url",
    "events"
  ],
  "properties": {
    "url": {
      "type": "string",
      "format": "uri",
      "description": "HTTPS endpoint to receive webhook payloads"
    },
    "events": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "enum": [
          "call.started",
          "call.completed",
          "call.failed",
          "campaign.started",
          "campaign.completed",
          "campaign.paused",
          "contact.created",
          "contact.updated",
          "credits.low",
          "credits.depleted"
        ]
      }
    },
    "secret": {
      "type": "string",
      "description": "Custom signing secret (auto-generated if not provided)"
    },
    "description": {
      "type": "string"
    }
  }
}