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

# Delete Webhook

> Delete a webhook and its subscriptions; it stops receiving events. Past delivery records are kept.

[Subtotal Connector tool: delete\_webhook](/docs/connector/tools.md#delete_webhook)

## Access

Call this endpoint with your API key, or with a [Subtotal Connector](/docs/connector/introduction.md) OAuth token that includes `webhooks:write`. A token without `webhooks:write` receives `403 insufficient_scope`. [Partner app](/docs/partner-apps/introduction.md#fixed-permissions) tokens don't include it.

## Example

```bash theme={null}
curl --request DELETE 'https://api.subtotal.com/webhooks/01JA7Q2W3E4R5T6Y7U8I9O0P1A' \
  --header "x-api-key: $SUBTOTAL_API_KEY"
```

Returns `204 No Content`. The webhook stops receiving events immediately, and this can't be undone. To stop deliveries temporarily instead, [pause it](/docs/api-reference/webhooks/update-webhook.md) with `{"is_active": false}`.

## Errors

| Status | When |
| - | - |
| `404` | No webhook with this `webhook_id` on your account |


## OpenAPI

````yaml delete /webhooks/{webhook_id}
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /webhooks/{webhook_id}:
    delete:
      tags:
        - webhooks
      summary: Delete Webhook
      description: >-
        Delete a webhook and its subscriptions; it stops receiving events. Past
        delivery records are kept.
      operationId: delete_webhook_webhooks__webhook_id__delete
      parameters:
        - name: webhook_id
          in: path
          required: true
          schema:
            type: string
            title: Webhook Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      responses:
        '204':
          description: Successful Response
        '404':
          description: No webhook with this id on the account.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````

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