{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/brixsignage-com/json-schema/brixsignage-com-webhook-endpoint-schema.json",
  "title": "WebhookEndpoint",
  "description": "A customer webhook endpoint. The signing secret is never returned after creation.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/brixsignage-com-webhooks-api-openapi.yml#/components/schemas/WebhookEndpoint",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Webhook endpoint id."
    },
    "url": {
      "type": "string",
      "description": "Where deliveries are POSTed."
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "secretPreview": {
      "type": "string",
      "description": "First 8 characters of the signing secret."
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Subscribed event names (see `GET /v1/webhooks/events`)."
    },
    "enabled": {
      "type": "boolean"
    },
    "autoDisabledAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ],
      "description": "Set when repeated failures switched the endpoint off."
    },
    "autoDisabledReason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "consecutiveFailures": {
      "type": "integer"
    },
    "lastDeliveryAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "lastStatus": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "description": "HTTP status of the last delivery attempt."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO-8601 timestamp (UTC)."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO-8601 timestamp (UTC)."
    }
  },
  "required": [
    "id",
    "url",
    "description",
    "secretPreview",
    "events",
    "enabled",
    "autoDisabledAt",
    "autoDisabledReason",
    "consecutiveFailures",
    "lastDeliveryAt",
    "lastStatus",
    "createdAt",
    "updatedAt"
  ]
}