{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/atlar/json-schema/atlar-create-webhook-request-schema.json",
  "title": "CreateWebhookRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/atlar-webhooks-api-openapi.yml#/components/schemas/CreateWebhookRequest",
  "type": "object",
  "properties": {
    "url": {
      "$ref": "#/$defs/WebhookURL"
    },
    "filters": {
      "description": "An inclusive filter to specify which resources and events that you are interested in.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/CreateWebhookFilter"
      },
      "minItems": 1,
      "maxItems": 100
    },
    "alias": {
      "description": "A human-readable name for the webhook.",
      "type": "string",
      "maxLength": 100
    }
  },
  "required": [
    "filters",
    "url"
  ],
  "$defs": {
    "CreateWebhookFilter": {
      "type": "object",
      "properties": {
        "resource": {
          "description": "The API resource for which to receive webhooks. See available\nresources in the [Webhooks and events](https://docs.atlar.com/docs/api#webhooks-and-events) section.\n",
          "type": "string"
        },
        "eventTypes": {
          "description": "A list of event types for which to receive webhooks.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/EventType"
          },
          "minItems": 1
        }
      },
      "required": [
        "resource",
        "eventTypes"
      ]
    },
    "EventType": {
      "type": "string",
      "description": "Event type.",
      "enum": [
        "CREATED",
        "UPDATED",
        "DELETED"
      ]
    },
    "WebhookURL": {
      "description": "The URL to which webhooks will be sent via HTTP POST requests in JSON format. Must use scheme `https://`.\n",
      "type": "string",
      "minLength": 1,
      "maxLength": 1024,
      "pattern": "^https://"
    }
  }
}