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

# Get All Webhooks

> Retrieve active webhooks for your account, including event types, protocols, and metadata.

**Catch-all accounts:** returns the lab's webhooks. **Party-scoped accounts:** you MUST pass a party (`corporateUser` or `organization`) and only that party's webhooks are returned.



## OpenAPI

````yaml GET /client/events/getAllEvents
openapi: 3.0.3
info:
  title: Webhooks API
  version: 1.0.0
  description: >-
    APIs for managing webhook to receive real-time notifications about bill and
    report events.
servers:
  - url: https://v2.flabs.in
    description: Production Server
security: []
paths:
  /client/events/getAllEvents:
    get:
      summary: Get all webhook
      description: >-
        Retrieve active webhooks for your account, including event types,
        protocols, and metadata.


        **Catch-all accounts:** returns the lab's webhooks. **Party-scoped
        accounts:** you MUST pass a party (`corporateUser` or `organization`)
        and only that party's webhooks are returned.
      parameters:
        - name: labID
          in: query
          required: true
          schema:
            type: string
          description: >-
            Flabs lab (branch) identifier. Fetch the list of labs via GET
            /client/labs.
        - name: corporateUser
          in: query
          required: false
          schema:
            type: string
          description: >-
            Party-scoped accounts only. Return only this corporate's webhooks.
            Pass either `corporateUser` or `organization`, not both.
        - name: organization
          in: query
          required: false
          schema:
            type: string
          description: >-
            Party-scoped accounts only. Return only this doctor/hospital's
            webhooks. Pass either `corporateUser` or `organization`, not both.
      responses:
        '200':
          description: Successfully retrieved webhook
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Subscribed events fetched successfully
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        _id:
                          type: string
                          description: Unique identifier for the webhook
                        events:
                          type: array
                          items:
                            type: string
                            enum:
                              - bill.created
                              - bill.deleted
                              - bill.completed
                              - report.completed
                              - lead.created
                              - booking.created
                              - booking.phlebotomist_assigned
                              - booking.phlebotomist_arrived
                              - booking.phlebotomist_sample_collected
                              - booking.phlebotomist_sample_submitted
                              - booking.rescheduled
                              - booking.cancelled
                          description: List of subscribed event types
                        protocol:
                          type: string
                          enum:
                            - https
                          description: Protocol used for webhook delivery
                        corporateUser:
                          type: string
                          description: >-
                            Party-scoped accounts: the corporate this webhook is
                            bound to (if any).
                        organization:
                          type: string
                          description: >-
                            Party-scoped accounts: the doctor/hospital this
                            webhook is bound to (if any).
                        createdAt:
                          type: string
                          format: date-time
                          description: ISO 8601 timestamp when was created
                        updatedAt:
                          type: string
                          format: date-time
                          description: ISO 8601 timestamp when was last updated
              example:
                success: true
                message: Subscribed events fetched successfully
                data:
                  - _id: <unique id>
                    events:
                      - bill.completed
                    protocol: https
                    createdAt: '2025-08-21T08:57:49.700Z'
                    updatedAt: '2025-08-21T08:57:49.700Z'
        4XX:
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  status:
                    type: integer
                  message:
                    type: string
                  error:
                    type: object
                    properties:
                      details:
                        type: string
              example:
                success: false
                status: 401
                message: Unauthorized
                error:
                  details: Invalid client credentials
        5XX:
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  status:
                    type: integer
                  message:
                    type: string
                  error:
                    type: object
                    properties:
                      details:
                        type: string
              example:
                success: false
                status: 500
                message: Internal Server Error
                error:
                  details: An unexpected error occurred
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token obtained from the authentication endpoint

````