{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendmux-ai/json-schema/sendmux-ai-webhook-subscription-cursor-list-response-schema.json",
  "title": "WebhookSubscriptionCursorListResponse",
  "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/WebhookSubscriptionCursorListResponse",
  "allOf": [
    {
      "$ref": "#/$defs/SuccessEnvelope"
    },
    {
      "properties": {
        "data": {
          "items": {
            "$ref": "#/$defs/WebhookSubscription"
          },
          "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"
    },
    "WebhookFilters": {
      "additionalProperties": false,
      "description": "Optional delivery scope. Empty mailbox_ids means all team mailboxes.",
      "properties": {
        "mailbox_ids": {
          "description": "Mailbox public IDs to receive events for. Empty means all mailboxes in the team.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "mailbox_ids"
      ],
      "type": "object"
    },
    "WebhookSubscription": {
      "additionalProperties": false,
      "properties": {
        "created_at": {
          "description": "ISO 8601 creation timestamp",
          "type": "string"
        },
        "enabled": {
          "description": "When false, no events are delivered to this subscription.",
          "type": "boolean"
        },
        "event_types": {
          "description": "Event types this subscription receives.",
          "items": {
            "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"
          },
          "type": "array"
        },
        "failing": {
          "description": "True when the 24-hour retry window has been exhausted for this subscription. Reset by updating the subscription (e.g. fixing the URL) and re-enabling.",
          "type": "boolean"
        },
        "filters": {
          "$ref": "#/$defs/WebhookFilters"
        },
        "id": {
          "description": "Webhook public ID",
          "type": "string"
        },
        "name": {
          "description": "Optional human-friendly label used in dashboard list/detail pages. May be `null` for subscriptions created without a name.",
          "type": [
            "string",
            "null"
          ]
        },
        "updated_at": {
          "description": "ISO 8601 last-modified timestamp",
          "type": "string"
        },
        "url": {
          "description": "HTTPS endpoint that receives signed event POSTs.",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "url",
        "event_types",
        "filters",
        "enabled",
        "failing",
        "created_at",
        "updated_at"
      ],
      "type": "object"
    }
  }
}