> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unifystays.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Webhook Events

> Browse immutable webhook events generated for your organization.

Filter by exact `event_type` or `aggregate_id`. For booking events, the aggregate
ID is the Unifystays `booking_id`.

Results are newest first and include the payload delivered to subscribed
endpoints. Event and completed delivery records are retained for 90 days.


## OpenAPI

````yaml reference/openapi.json GET /webhooks/events
openapi: 3.0.0
info:
  title: Unifystays API
  description: >-
    One unified hotel API across suppliers. Integrate once, then enable and
    manage suppliers from the Unifystays portal.
  version: '1.0'
  contact: {}
servers:
  - url: https://api-sandbox.unifystays.com
    description: Sandbox
  - url: https://api.unifystays.com
    description: Production
security:
  - x-api-key: []
tags: []
paths:
  /webhooks/events:
    get:
      tags:
        - Webhooks
      summary: List generated webhook events
      description: >-
        Returns the immutable event records generated for the authenticated
        organization.
      operationId: WebhookController_listEvents
      parameters:
        - name: event_type
          required: false
          in: query
          description: Return only this exact event type.
          schema:
            example: booking.confirmed
            type: string
        - name: aggregate_id
          required: false
          in: query
          description: Return records for one aggregate, such as a Unifystays booking ID.
          schema:
            type: string
            example: ubk_eGQ0dW9uV1Vi
        - name: page
          required: false
          in: query
          description: Page number, starting at 1.
          schema:
            $ref: '#/components/schemas/Object'
        - name: limit
          required: false
          in: query
          description: Records per page.
          schema:
            $ref: '#/components/schemas/Object'
        - name: language
          description: Enter language code(ex. en)
          in: header
          schema: {}
      responses:
        '200':
          description: Webhook events retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEventListResponseDto'
components:
  schemas:
    Object:
      type: object
      properties: {}
    WebhookEventListResponseDto:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEventResponseDto'
        meta:
          $ref: '#/components/schemas/WebhookPageMetaResponseDto'
      required:
        - data
        - meta
    WebhookEventResponseDto:
      type: object
      properties:
        id:
          type: string
          example: evt_3bc2fa3d35cc4bbf98359b3fb85a4fb2
          description: Immutable webhook event identifier.
        org_id:
          type: string
          example: org_123
          description: Organization that owns the event.
        event_type:
          type: string
          enum:
            - booking.created
            - booking.confirmed
            - booking.failed
            - booking.cancellation_requested
            - booking.cancelled
            - booking.cancellation_failed
            - webhook.test
          example: booking.confirmed
          description: Event type used for endpoint subscription matching.
        schema_version:
          type: number
          example: 1
          description: Event schema version.
        aggregate_type:
          type: string
          example: booking
          description: Resource category associated with the event.
        aggregate_id:
          type: string
          example: ubk_eGQ0dW9uV1Vi
          description: Identifier of the associated resource.
        aggregate_version:
          type: number
          example: 2
          description: >-
            Monotonically increasing resource version used to handle
            out-of-order events.
        payload:
          description: Exact JSON body sent to the receiver.
          allOf:
            - $ref: '#/components/schemas/WebhookPayloadResponseDto'
        occurred_at:
          type: string
          format: date-time
          example: '2026-08-08T08:30:00.000Z'
          description: Time the source event occurred.
        fanout_at:
          type: string
          format: date-time
          nullable: true
          example: '2026-08-08T08:30:00.100Z'
          description: Time endpoint delivery records were created.
        created_at:
          type: string
          format: date-time
          example: '2026-08-08T08:30:00.000Z'
          description: Event record creation time.
      required:
        - id
        - org_id
        - event_type
        - schema_version
        - aggregate_type
        - aggregate_id
        - aggregate_version
        - payload
        - occurred_at
        - fanout_at
        - created_at
    WebhookPageMetaResponseDto:
      type: object
      properties:
        total:
          type: number
          example: 42
          description: Total matching records.
        page:
          type: number
          example: 1
          description: Current page number.
        limit:
          type: number
          example: 20
          description: Maximum records per page.
        total_pages:
          type: number
          example: 3
          description: Total number of pages.
      required:
        - total
        - page
        - limit
        - total_pages
    WebhookPayloadResponseDto:
      type: object
      properties:
        id:
          type: string
          example: evt_3bc2fa3d35cc4bbf98359b3fb85a4fb2
          description: Event identifier used for idempotent processing.
        type:
          type: string
          enum:
            - booking.created
            - booking.confirmed
            - booking.failed
            - booking.cancellation_requested
            - booking.cancelled
            - booking.cancellation_failed
            - webhook.test
          example: booking.confirmed
          description: Event type.
        schema_version:
          type: number
          example: 1
          description: Version of the webhook payload schema.
        created_at:
          type: string
          format: date-time
          example: '2026-08-08T08:30:00.000Z'
          description: Time the event occurred.
        organization_id:
          type: string
          example: org_123
          description: Organization that owns the event.
        data:
          type: object
          additionalProperties: true
          example:
            object:
              object: booking
              id: ubk_eGQ0dW9uV1Vi
              version: 2
              status: CONFIRMED
              is_terminal: true
            previous_status: PROCESSING
          description: >-
            Event-specific data. The object field contains the current resource
            snapshot.
      required:
        - id
        - type
        - schema_version
        - created_at
        - organization_id
        - data
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: Environment-specific API key created in the Unifystays portal

````