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

# List Webhooks

> List all webhooks for a business.



## OpenAPI

````yaml get /webhooks
openapi: 3.1.0
info:
  title: public
  description: ''
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 1.102.0
servers:
  - url: https://test.dodopayments.com/
    description: Test Mode Server Host
  - url: https://live.dodopayments.com/
    description: Live Mode Server Host
security: []
tags:
  - name: Products
  - name: Payments
  - name: Subscriptions
  - name: Addons
  - name: Customers
  - name: Refunds
  - name: Disputes
  - name: Events
  - name: License Keys
  - name: Entitlements
  - name: Licenses
  - name: Discounts
  - name: Meters
  - name: Credit Entitlements
  - name: Credit Entitlement Balances
  - name: Outgoing Webhooks
  - name: Checkout
  - name: Webhook Events
paths:
  /webhooks:
    get:
      tags:
        - Webhooks
      summary: List all webhooks
      operationId: list_webhooks
      parameters:
        - name: limit
          in: query
          description: Limit the number of returned items
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int32
        - name: iterator
          in: query
          description: The iterator returned from a prior invocation
          required: false
          schema:
            type:
              - string
              - 'null'
      responses:
        '200':
          description: List of endpoints
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListWebhooksResponse'
      security:
        - API_KEY: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import DodoPayments from 'dodopayments';

            const client = new DodoPayments({
              bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
            });

            // Automatically fetches more pages as needed.
            for await (const webhookDetails of client.webhooks.list()) {
              console.log(webhookDetails.id);
            }
        - lang: Python
          source: |-
            import os
            from dodopayments import DodoPayments

            client = DodoPayments(
                bearer_token=os.environ.get("DODO_PAYMENTS_API_KEY"),  # This is the default and can be omitted
            )
            page = client.webhooks.list()
            page = page.data[0]
            print(page.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/dodopayments/dodopayments-go\"\n\t\"github.com/dodopayments/dodopayments-go/option\"\n)\n\nfunc main() {\n\tclient := dodopayments.NewClient(\n\t\toption.WithBearerToken(\"My Bearer Token\"),\n\t)\n\tpage, err := client.Webhooks.List(context.TODO(), dodopayments.WebhookListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\n}\n"
        - lang: Java
          source: |-
            package com.dodopayments.api.example;

            import com.dodopayments.api.client.DodoPaymentsClient;
            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;
            import com.dodopayments.api.models.webhooks.WebhookListPage;
            import com.dodopayments.api.models.webhooks.WebhookListParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

                    WebhookListPage page = client.webhooks().list();
                }
            }
        - lang: Kotlin
          source: |-
            package com.dodopayments.api.example

            import com.dodopayments.api.client.DodoPaymentsClient
            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient
            import com.dodopayments.api.models.webhooks.WebhookListPage
            import com.dodopayments.api.models.webhooks.WebhookListParams

            fun main() {
                val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

                val page: WebhookListPage = client.webhooks().list()
            }
        - lang: Ruby
          source: |-
            require "dodopayments"

            dodo_payments = Dodopayments::Client.new(
              bearer_token: "My Bearer Token",
              environment: "test_mode" # defaults to "live_mode"
            )

            page = dodo_payments.webhooks.list

            puts(page)
        - lang: PHP
          source: |-
            <?php

            require_once dirname(__DIR__) . '/vendor/autoload.php';

            use Dodopayments\Client;
            use Dodopayments\Core\Exceptions\APIException;

            $client = new Client(
              bearerToken: getenv('DODO_PAYMENTS_API_KEY') ?: 'My Bearer Token',
              environment: 'test_mode',
            );

            try {
              $page = $client->webhooks->list(iterator: 'iterator', limit: 0);

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: |-
            using System;
            using DodoPayments.Client;
            using DodoPayments.Client.Models.Webhooks;

            DodoPaymentsClient client = new();

            WebhookListParams parameters = new();

            var page = await client.Webhooks.List(parameters);
            await foreach (var item in page.Paginate())
            {
                Console.WriteLine(item);
            }
components:
  schemas:
    ListWebhooksResponse:
      type: object
      required:
        - data
        - done
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WebhookDetails'
          description: List of webhoooks
        done:
          type: boolean
          description: true if no more values are to be fetched.
        iterator:
          type:
            - string
            - 'null'
          description: Cursor pointing to the next paginated object
        prev_iterator:
          type:
            - string
            - 'null'
          description: Cursor pointing to the previous paginated object
    WebhookDetails:
      type: object
      title: Webhook Details
      required:
        - description
        - id
        - metadata
        - created_at
        - updated_at
        - url
      properties:
        created_at:
          type: string
          description: Created at timestamp
        description:
          type: string
          description: An example webhook name.
        disabled:
          type:
            - boolean
            - 'null'
          description: |-
            Status of the webhook.

            If true, events are not sent
        filter_types:
          type:
            - array
            - 'null'
          items:
            type: string
          description: |-
            Filter events to the webhook.

            Webhook event will only be sent for events in the list.
        id:
          type: string
          description: The webhook's ID.
        metadata:
          type: object
          description: Metadata of the webhook
          additionalProperties:
            type: string
          propertyNames:
            type: string
        rate_limit:
          type:
            - integer
            - 'null'
          format: int32
          description: Configured rate limit
          minimum: 0
        updated_at:
          type: string
          description: Updated at timestamp
        url:
          type: string
          description: Url endpoint of the webhook
  securitySchemes:
    API_KEY:
      type: http
      scheme: bearer

````