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

# Delete a webhook

> **Legacy:** This deletes a previous-generation webhook. If you're replacing it rather than retiring it, consider recreating it as a [webhook endpoint](/api-reference/webhooks/create-a-webhook-endpoint) — see the [webhooks guides](/webhooks/overview).

Deletes the webhook and stops all future deliveries of its subscribed events to the target URL. Returns `204 No Content` on success, `404` when the id doesn't exist, and `422` when the webhook cannot be deleted.

Find webhook ids with [List webhooks](/api-reference/webhooks-legacy/list-webhooks); register a replacement with [Create a webhook](/api-reference/webhooks-legacy/create-a-webhook).



## OpenAPI

````yaml /api-reference/v4.json delete /v4/webhooks/{id}
openapi: 3.0.3
info:
  title: Kit API
  version: '4.0'
servers:
  - url: https://api.kit.com
security: []
paths:
  /v4/webhooks/{id}:
    delete:
      tags:
        - Webhooks (Legacy)
      summary: Delete a webhook
      description: >-
        **Legacy:** This deletes a previous-generation webhook. If you're
        replacing it rather than retiring it, consider recreating it as a
        [webhook endpoint](/api-reference/webhooks/create-a-webhook-endpoint) —
        see the [webhooks guides](/webhooks/overview).


        Deletes the webhook and stops all future deliveries of its subscribed
        events to the target URL. Returns `204 No Content` on success, `404`
        when the id doesn't exist, and `422` when the webhook cannot be deleted.


        Find webhook ids with [List
        webhooks](/api-reference/webhooks-legacy/list-webhooks); register a
        replacement with [Create a
        webhook](/api-reference/webhooks-legacy/create-a-webhook).
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
          example: 31
      responses:
        '204':
          description: Deletes the webhook
        '401':
          description: Returns a 401 if the token and/or account cannot be authenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                required:
                  - errors
              example:
                errors:
                  - The access token is invalid
        '404':
          description: Returns a 404 when the provided id does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                required:
                  - errors
              example:
                errors:
                  - Not Found
        '422':
          description: Returns a 422 when the webhook cannot be deleted
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                required:
                  - errors
              example:
                errors:
                  - Unable to destroy the webhook.
      security:
        - API Key: []
        - OAuth2: []
components:
  securitySchemes:
    API Key:
      description: Authenticate API requests via an API Key
      type: apiKey
      in: header
      name: X-Kit-Api-Key
    OAuth2:
      description: Authenticate API requests via an OAuth token
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://api.kit.com/v4/oauth/authorize
          tokenUrl: https://api.kit.com/v4/oauth/token
          refreshUrl: https://api.kit.com/v4/oauth/token
          scopes:
            read: Read access to Kit API v4
            write: Write access to Kit API v4

````

## Related topics

- [Upgrading to V4](/api-reference/upgrading-to-v4.md)
- [Delete a webhook endpoint](/api-reference/webhooks/delete-a-webhook-endpoint.md)
- [API Authentication](/api-reference/authentication.md)
- [Managing plugins](/plugins/managing-plugins.md)
- [Webhooks overview](/webhooks/overview.md)
