{
  "components": {
    "schemas": {
      "Delivery": {
        "additionalProperties": true,
        "description": "A batch of forwarded events of one tenant.",
        "properties": {
          "delivered_at": {
            "description": "When the request was sent: RFC 3339, UTC.",
            "format": "date-time",
            "type": "string"
          },
          "events": {
            "description": "The events, each exactly the body of a syslog message.",
            "items": {
              "$ref": "https://docs.xplicittrust.com/events/schema/event.schema.json"
            },
            "maxItems": 500,
            "type": "array"
          },
          "tenant_id": {
            "description": "The id of the tenant.",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "tenant_id",
          "delivered_at",
          "events"
        ],
        "type": "object"
      }
    }
  },
  "externalDocs": {
    "url": "https://docs.xplicittrust.com/events/https-webhook/"
  },
  "info": {
    "description": "A forwarder delivers the events of one tenant in batches, in the order they were recorded, at least once. Schema version 1.2.0, first sent by product release 1.139.",
    "summary": "The request an event forwarder of type HTTPS webhook sends to a receiver.",
    "title": "XplicitTrust event forwarding, HTTPS webhook",
    "version": "1.2.0"
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "openapi": "3.1.0",
  "paths": {},
  "webhooks": {
    "events": {
      "post": {
        "description": "Sent to the URL the forwarder is configured with. Up to 500 events per request.",
        "operationId": "deliverEvents",
        "parameters": [
          {
            "description": "sha256=<hex HMAC-SHA256 of the raw request body with the forwarder's secret>. Sent when the forwarder has a secret.",
            "in": "header",
            "name": "X-Webhook-Signature",
            "required": false,
            "schema": {
              "pattern": "^sha256=[0-9a-f]{64}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Delivery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "The batch is accepted. The forwarder goes on with the next events."
          },
          "429": {
            "description": "The forwarder sends the same batch again later."
          },
          "5XX": {
            "description": "The forwarder sends the same batch again later."
          },
          "default": {
            "description": "Any other status counts as a failed delivery; the forwarder backs off and sends the same batch again."
          }
        },
        "summary": "A batch of events"
      }
    }
  }
}
