{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postzen-dev/json-schema/postzen-dev-webhook-deliveries-list-response-schema.json",
  "title": "WebhookDeliveriesListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postzen-dev-webhooks-api-openapi.yml#/components/schemas/WebhookDeliveriesListResponse",
  "type": "object",
  "required": [
    "deliveries",
    "pagination"
  ],
  "properties": {
    "deliveries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WebhookDelivery"
      }
    },
    "pagination": {
      "$ref": "#/$defs/Pagination"
    }
  },
  "$defs": {
    "Pagination": {
      "type": "object",
      "required": [
        "page",
        "limit",
        "total",
        "totalPages"
      ],
      "properties": {
        "page": {
          "type": "integer",
          "minimum": 1
        },
        "limit": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "total": {
          "type": "integer",
          "minimum": 0
        },
        "totalPages": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "WebhookDelivery": {
      "type": "object",
      "required": [
        "event",
        "eventId",
        "deliveryId",
        "resourceId",
        "status",
        "attemptCount",
        "createdAt"
      ],
      "properties": {
        "event": {
          "$ref": "#/$defs/WebhookEvent"
        },
        "eventId": {
          "type": "string",
          "description": "Stable across automatic retries and manual redeliveries."
        },
        "deliveryId": {
          "type": "string"
        },
        "resourceId": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/WebhookDeliveryStatus"
        },
        "attemptCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Monotonic count across automatic retries and manual redeliveries."
        },
        "lastHttpStatus": {
          "type": "integer",
          "minimum": 100,
          "maximum": 599
        },
        "lastErrorCode": {
          "type": "string"
        },
        "lastDurationMs": {
          "type": "number",
          "minimum": 0
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "lastAttemptAt": {
          "type": "string",
          "format": "date-time"
        },
        "deliveredAt": {
          "type": "string",
          "format": "date-time"
        },
        "nextAttemptAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "WebhookDeliveryStatus": {
      "type": "string",
      "enum": [
        "pending",
        "retrying",
        "delivered",
        "failed"
      ]
    },
    "WebhookEvent": {
      "type": "string",
      "enum": [
        "post.scheduled",
        "post.published",
        "post.partially_failed",
        "post.failed",
        "post.cancelled",
        "post.platform.published",
        "post.platform.failed",
        "post.external.created",
        "account.connected",
        "account.needs_reauth",
        "account.disconnected",
        "analytics.synced",
        "conversation.started",
        "message.received",
        "message.sent",
        "comment.received",
        "contact.tag_added",
        "contact.tag_removed",
        "contact.field_changed",
        "webhook.test"
      ],
      "description": "Webhook event type. See the Webhook Events section for each event's trigger and payload. Receivers should tolerate additional event types in future API versions."
    }
  }
}