{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/apisign-io/json-schema/apisign-io-create-webhook-request-schema.json",
  "title": "CreateWebhookRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/apisign-io-webhooks-api-openapi.yml#/components/schemas/CreateWebhookRequest",
  "type": "object",
  "required": [
    "name",
    "url",
    "events"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "events": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/WebhookEventType"
      }
    },
    "headers": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Extra headers sent with each delivery"
    }
  },
  "$defs": {
    "WebhookEventType": {
      "type": "string",
      "enum": [
        "contract_created",
        "contract_sent",
        "contract_resent",
        "contract_viewed",
        "contract_signed",
        "contract_completed",
        "contract_declined",
        "contract_expired",
        "contract_cancelled"
      ]
    }
  }
}