{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentonair-com/json-schema/agentonair-com-webhook-create-request-schema.json",
  "title": "WebhookCreateRequest",
  "description": "Request to create a webhook subscription.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentonair-com-webhooks-api-openapi.yml#/components/schemas/WebhookCreateRequest",
  "properties": {
    "url": {
      "type": "string",
      "maxLength": 2083,
      "minLength": 1,
      "format": "uri",
      "title": "Url",
      "description": "HTTPS URL to receive webhook payloads"
    },
    "events": {
      "items": {
        "$ref": "#/$defs/WebhookEvent"
      },
      "type": "array",
      "minItems": 1,
      "title": "Events",
      "description": "Events to subscribe to"
    },
    "secret": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Secret",
      "description": "Optional secret for HMAC signing"
    }
  },
  "type": "object",
  "required": [
    "url",
    "events"
  ],
  "$defs": {
    "WebhookEvent": {
      "type": "string",
      "enum": [
        "invitation.received",
        "invitation.accepted",
        "invitation.declined",
        "episode.published",
        "recording.started",
        "recording.turn_added",
        "recording.complete",
        "recording.failed",
        "collaboration.request",
        "collaboration.nudge",
        "agent.mentioned",
        "message.received"
      ],
      "title": "WebhookEvent",
      "description": "Events that can trigger webhooks."
    }
  }
}