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

# Retrieve Customer Webhooks

> Retrieves all registered webhook endpoints associated with the customer.




## OpenAPI

````yaml /email-api/api-reference/openapi.yaml get /webhook
openapi: 3.0.0
info:
  contact:
    email: support@mailchannels.com
    name: MailChannels Corporation
  description: >
    This is the API reference for Email API. Here, you'll find more detailed
    information on every endpoint, including parameters, response formats, and
    error codes.
  title: Email API
  version: 1.4.0
servers:
  - url: https://api.mailchannels.net/tx/v1
security: []
tags:
  - name: Send
  - name: DKIM
  - name: Metrics
  - name: Sub-accounts
  - name: Suppression
  - name: Webhooks
  - name: Usage
  - name: Custom Tracking
paths:
  /webhook:
    get:
      tags:
        - Webhooks
      summary: Retrieve Customer Webhooks
      description: |
        Retrieves all registered webhook endpoints associated with the customer.
      parameters:
        - in: header
          name: X-Api-Key
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Webhook'
                type: array
          description: Successfully returning customer's webhooks
        '500':
          description: Internal Server Error
      x-codeSamples:
        - label: Node.js
          lang: javascript
          source: >-
            import { MailChannels } from "mailchannels-sdk";


            const { MAILCHANNELS_API_KEY } = process.env;

            if (!MAILCHANNELS_API_KEY) throw new Error("Set MAILCHANNELS_API_KEY
            before running");


            const mailchannels = new MailChannels(MAILCHANNELS_API_KEY);


            const { data, error } = await mailchannels.webhooks.list();


            if (error) {
              console.error("List webhooks failed:", error);
              process.exit(1);
            }

            console.log(data);
        - label: Python
          lang: python
          source: |-
            import os
            import sys

            import mailchannels

            if not os.environ.get("MAILCHANNELS_API_KEY"):
                sys.exit("Set MAILCHANNELS_API_KEY before running")

            # List all webhook endpoints currently enrolled for the account.
            response = mailchannels.Webhooks.list()

            print(response)
        - label: PHP
          lang: php
          source: >-
            <?php


            require_once __DIR__ . '/vendor/autoload.php';


            use MailChannels\Client;


            $api_key = getenv('MAILCHANNELS_API_KEY') or exit("Error:
            MAILCHANNELS_API_KEY is not set\n");


            $client = new Client(apiKey: $api_key);


            // List all webhook endpoints currently enrolled for the account.

            $response = $client->webhooks->list();


            print_r($response->toArray());
components:
  schemas:
    Webhook:
      properties:
        webhook:
          description: A customer's webhook that events will be sent to
          type: string
      required:
        - webhook
      type: object

````