{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendmux-ai/json-schema/sendmux-ai-webhook-delivery-attempt-cursor-list-response-schema.json",
  "title": "WebhookDeliveryAttemptCursorListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendmux-ai-webhooks-api-openapi.yml#/components/schemas/WebhookDeliveryAttemptCursorListResponse",
  "allOf": [
    {
      "$ref": "#/$defs/SuccessEnvelope"
    },
    {
      "properties": {
        "data": {
          "items": {
            "$ref": "#/$defs/WebhookDeliveryAttempt"
          },
          "type": "array"
        },
        "meta": {
          "$ref": "#/$defs/ResponseMeta"
        },
        "pagination": {
          "$ref": "#/$defs/CursorPagination"
        }
      },
      "required": [
        "data",
        "pagination"
      ],
      "type": "object"
    }
  ],
  "unevaluatedProperties": false,
  "$defs": {
    "CursorPagination": {
      "additionalProperties": false,
      "properties": {
        "has_more": {
          "type": "boolean"
        },
        "next_cursor": {
          "type": "string"
        }
      },
      "required": [
        "has_more"
      ],
      "type": "object"
    },
    "ResponseMeta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "request_id"
      ],
      "type": "object"
    },
    "SuccessEnvelope": {
      "properties": {
        "meta": {
          "additionalProperties": {},
          "properties": {},
          "type": "object"
        },
        "ok": {
          "enum": [
            true
          ],
          "type": "boolean"
        }
      },
      "required": [
        "ok",
        "meta"
      ],
      "type": "object"
    },
    "WebhookDeliveryAttempt": {
      "additionalProperties": false,
      "properties": {
        "created_at": {
          "description": "ISO 8601 attempt timestamp",
          "type": "string"
        },
        "delivery_attempt": {
          "description": "1-based retry attempt number.",
          "exclusiveMinimum": 0,
          "type": "integer"
        },
        "error_message": {
          "description": "Public-safe network error category when no HTTP response was received.",
          "type": [
            "string",
            "null"
          ]
        },
        "event_id": {
          "description": "Webhook event ID",
          "type": "string"
        },
        "event_type": {
          "description": "Event types a webhook may subscribe to. `sendmux.test` is accepted so you can verify end-to-end delivery via POST /webhooks/{id}/test.",
          "enum": [
            "message.delivered",
            "message.bounced",
            "message.complained",
            "message.rejected",
            "message.delivery_delayed",
            "message.received",
            "message.received.spam",
            "calendar.changed",
            "sendmux.test"
          ],
          "type": "string"
        },
        "id": {
          "description": "Delivery-attempt public ID",
          "type": "string"
        },
        "max_attempts": {
          "description": "Maximum attempts before the subscription is marked failing.",
          "exclusiveMinimum": 0,
          "type": "integer"
        },
        "next_retry_at": {
          "description": "Next retry timestamp when result is retrying; otherwise null.",
          "type": [
            "string",
            "null"
          ]
        },
        "payload_available": {
          "description": "True while the delivered request payload can still be fetched.",
          "type": "boolean"
        },
        "payload_expires_at": {
          "description": "Timestamp when the retained request payload expires.",
          "type": "string"
        },
        "request_payload_bytes": {
          "description": "Size of the delivered request payload in bytes.",
          "minimum": 0,
          "type": "integer"
        },
        "request_payload_sha256": {
          "description": "SHA-256 digest of the delivered request payload.",
          "type": [
            "string",
            "null"
          ]
        },
        "response_body": {
          "description": "Truncated endpoint response preview, if any.",
          "type": [
            "string",
            "null"
          ]
        },
        "response_ms": {
          "description": "End-to-end delivery latency in milliseconds.",
          "minimum": 0,
          "type": "integer"
        },
        "response_status": {
          "description": "HTTP status returned by the endpoint, or null for network/timeout failures.",
          "type": [
            "integer",
            "null"
          ]
        },
        "result": {
          "description": "Delivery result for this attempt.",
          "enum": [
            "success",
            "retrying",
            "failed",
            "permanent_failure"
          ],
          "type": "string"
        }
      },
      "required": [
        "id",
        "event_id",
        "event_type",
        "result",
        "response_status",
        "response_ms",
        "delivery_attempt",
        "max_attempts",
        "next_retry_at",
        "error_message",
        "response_body",
        "payload_available",
        "payload_expires_at",
        "request_payload_bytes",
        "request_payload_sha256",
        "created_at"
      ],
      "type": "object"
    }
  }
}