{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/brixsignage-com/json-schema/brixsignage-com-webhook-delivery-schema.json",
  "title": "WebhookDelivery",
  "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/WebhookDelivery",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Webhook delivery id."
    },
    "endpointId": {
      "type": "string"
    },
    "event": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "delivered",
        "failed",
        "abandoned"
      ],
      "description": "`failed` is retried later; `abandoned` is not retried again."
    },
    "attempts": {
      "type": "integer"
    },
    "occurredAt": {
      "type": "string",
      "description": "ISO-8601 timestamp (UTC)."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO-8601 timestamp (UTC)."
    },
    "nextAttemptAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ],
      "description": "When the next retry is due; null when none is."
    },
    "deliveredAt": {
      "anyOf": [
        {
          "type": "string",
          "description": "ISO-8601 timestamp (UTC)."
        },
        {
          "type": "null"
        }
      ]
    },
    "responseStatus": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "replayOf": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "Set on a delivery made by a replay: the delivery it resends."
    },
    "payload": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "deliveryId": {
              "type": "string"
            },
            "event": {
              "type": "string"
            },
            "occurredAt": {
              "type": "string",
              "description": "ISO-8601 timestamp (UTC)."
            },
            "workspaceId": {
              "type": "string"
            },
            "attempt": {
              "type": "integer"
            },
            "data": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {},
              "description": "The event's own fields. A test send carries `{ test: true, note }`."
            },
            "replayOf": {
              "description": "On a replay: the delivery it resends.",
              "type": "string"
            }
          },
          "required": [
            "deliveryId",
            "event",
            "occurredAt",
            "workspaceId",
            "attempt",
            "data"
          ],
          "description": "The JSON body as it was sent to the receiver."
        },
        {
          "type": "null"
        }
      ],
      "description": "The JSON body as it was sent; null if the stored copy cannot be read."
    }
  },
  "required": [
    "id",
    "endpointId",
    "event",
    "status",
    "attempts",
    "occurredAt",
    "createdAt",
    "nextAttemptAt",
    "deliveredAt",
    "responseStatus",
    "error",
    "replayOf",
    "payload"
  ]
}