> ## 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.

# Delete Customer Webhooks

> Deletes all registered webhook endpoints for the customer.




## OpenAPI

````yaml /email-api/api-reference/openapi.yaml delete /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:
    delete:
      tags:
        - Webhooks
      summary: Delete Customer Webhooks
      description: |
        Deletes all registered webhook endpoints for the customer.
      parameters:
        - in: header
          name: X-Api-Key
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Successfully removed webhook endpoint(s)
        '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 { success, error } = await mailchannels.webhooks.deleteAll();


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

            console.log("All webhooks deleted");
        - 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")

            # Delete all webhook endpoints enrolled for the account.
            response = mailchannels.Webhooks.delete_all()

            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);


            // Delete all webhook endpoints enrolled for the account.

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


            print_r($response->toArray());

````