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

# Delete Webhook Endpoint

> Permanently delete a webhook configuration

# Delete Webhook Endpoint

DELETE [https://api.baanx.com/v1/webhooks/\{id}](https://api.baanx.com/v1/webhooks/\{id})
Permanently deletes a webhook configuration.

## Overview

Removes a webhook endpoint and stops all future event deliveries to it. This action cannot be undone. If you want to temporarily stop deliveries, consider [disabling the webhook](/api-reference/webhooks/update-webhook) with `is_active: false` instead.

<Warning>
  This action is **permanent and irreversible**. All configuration, including the signing key, will be lost. Event delivery to this endpoint will stop immediately.
</Warning>

## Authentication

This endpoint requires authentication via Bearer token:

```bash theme={null} theme={null}
Authorization: Bearer YOUR_ACCESS_TOKEN
```

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication
</ParamField>

### Path Parameters

<ParamField path="id" type="string (UUID)" required>
  Unique identifier of the webhook configuration to delete
</ParamField>

### Request Example

<CodeGroup>
  ```bash cURL theme={null} theme={null}
  curl -X DELETE https://api.baanx.com/v1/webhooks/550e8400-e29b-41d4-a716-446655440000 \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```javascript JavaScript theme={null} theme={null}
  const webhookId = '550e8400-e29b-41d4-a716-446655440000';

  const response = await fetch(`https://api.baanx.com/v1/webhooks/${webhookId}`, {
    method: 'DELETE',
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
    }
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null} theme={null}
  import requests

  webhook_id = "550e8400-e29b-41d4-a716-446655440000"
  url = f"https://api.baanx.com/v1/webhooks/{webhook_id}"
  headers = {
      "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  }

  response = requests.delete(url, headers=headers)
  print(response.json())
  ```

  ```typescript TypeScript theme={null} theme={null}
  const deleteWebhook = async (webhookId: string): Promise<{ success: boolean }> => {
    const response = await fetch(`https://api.baanx.com/v1/webhooks/${webhookId}`, {
      method: 'DELETE',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
      }
    });

    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }

    return await response.json();
  };
  ```
</CodeGroup>

## Response

### 200 Success

<ResponseField name="success" type="boolean">
  Indicates the webhook was deleted successfully
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null} theme={null}
  {
    "success": true
  }
  ```
</ResponseExample>

## Error Responses

<ResponseExample>
  ```json 401 - Unauthorized theme={null} theme={null}
  {
    "message": "Not authenticated"
  }
  ```

  ```json 403 - Forbidden theme={null} theme={null}
  {
    "message": "Not authorized"
  }
  ```

  ```json 404 - Not Found theme={null} theme={null}
  {
    "message": "Webhook config not found"
  }
  ```

  ```json 503 - Service Unavailable theme={null} theme={null}
  {
    "message": "Notification service is not configured for this environment"
  }
  ```
</ResponseExample>

## Related Endpoints

* `GET /v1/webhooks` - List all remaining webhook endpoints
* `POST /v1/webhooks` - Create a new webhook endpoint
* `PUT /v1/webhooks/{id}` - Disable a webhook temporarily (`is_active: false`)
