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

# Delete a webhook endpoint

> Delete an endpoint and stop every delivery still waiting for it.

Deletes the endpoint and its delivery log. Deliveries still retrying stop. To pause instead, [update it](https://docs.integrateledger.com/api-reference/webhooks/update.md) with `disabled: true`.


## OpenAPI

````yaml openapi.json DELETE /v1/webhook-endpoints/{id}
openapi: 3.1.0
info:
  title: Ledger API
  version: 0.1.0
servers:
  - url: https://api.integrateledger.com
    description: Hosted Ledger API
security: []
paths:
  /v1/webhook-endpoints/{id}:
    delete:
      tags:
        - Webhooks
      summary: Delete a webhook endpoint
      operationId: deleteWebhookEndpoint
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 64
            pattern: ^we_[A-Za-z0-9]+$
          required: true
          name: id
          in: path
      responses:
        '200':
          description: Endpoint deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedWebhookEndpoint'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookError'
        '401':
          description: Invalid Ledger API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookError'
        '404':
          description: Endpoint not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookError'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - ApiKey: []
      x-codeSamples:
        - lang: python
          label: Python SDK
          source: |-
            import os
            from integrateledger import ledger

            client = ledger(api_key=os.environ["LEDGER_API_KEY"])
            client.delete_webhook_endpoint("we_123")
        - lang: bash
          label: cURL
          source: >-
            curl --request DELETE
            'https://api.integrateledger.com/v1/webhook-endpoints/we_123' \
              -H "Authorization: Bearer $LEDGER_API_KEY"
        - lang: typescript
          label: TypeScript SDK
          source: >-
            import ledger from "integrateledger";


            const client = new ledger({ apiKey: process.env.LEDGER_API_KEY ?? ""
            });

            await client.deleteWebhookEndpoint({ id: "we_123" });
components:
  schemas:
    DeletedWebhookEndpoint:
      type: object
      properties:
        id:
          type: string
        deleted:
          type: boolean
          const: true
      required:
        - id
        - deleted
    WebhookError:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    RateLimitError:
      type: object
      properties:
        error:
          type: string
          example: rate_limited
      required:
        - error
  responses:
    RateLimited:
      description: >-
        Too many requests. Wait Retry-After seconds, then retry. See the rate
        limits guide.
      headers:
        Retry-After:
          description: Seconds until a request is allowed again
          schema:
            type: integer
        RateLimit-Limit:
          description: 'The burst: requests allowed at once'
          schema:
            type: integer
        RateLimit-Remaining:
          description: Requests left right now
          schema:
            type: integer
        RateLimit-Reset:
          description: Seconds until the full burst is back
          schema:
            type: integer
        RateLimit-Policy:
          description: >-
            The sustained rate per second and the burst, such as
            200;w=1;burst=1000
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitError'
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.