# Delete webhook

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

DELETE https://dashboard.alchemy.com/api/delete-webhook

Deletes a webhook. This works for every webhook that the team owns,
including V1 webhooks and webhooks of retired types.

Reference: https://www.alchemy.com/docs/data/webhooks/webhooks-api-endpoints/delete-webhook

## Headers

| Name | Type | Required | Description |
|------|------|----------|-------------|
| X-Alchemy-Token | string | Yes | Your team's auth token. Find it on the Webhooks page of the Alchemy dashboard. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| webhook_id | string | Yes | The webhook ID, for example `wh_abc123`. |

## Code Examples

### cURL

```bash
curl --request DELETE \
  --url 'https://dashboard.alchemy.com/api/delete-webhook?webhook_id=string' \
  --header 'X-Alchemy-Token: string'
```

### JavaScript

```javascript
const options = {method: 'DELETE', headers: {'X-Alchemy-Token': 'string'}};

fetch('https://dashboard.alchemy.com/api/delete-webhook?webhook_id=string', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://dashboard.alchemy.com/api/delete-webhook?webhook_id=string"

headers = {"X-Alchemy-Token": "string"}

response = requests.delete(url, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://dashboard.alchemy.com/api/delete-webhook?webhook_id=string"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("X-Alchemy-Token", "string")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.delete("https://dashboard.alchemy.com/api/delete-webhook?webhook_id=string")
  .header("X-Alchemy-Token", "string")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://dashboard.alchemy.com/api/delete-webhook?webhook_id=string");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Alchemy-Token", "string");
var response = await client.DeleteAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /api/delete-webhook
method: DELETE
operation:
  operationId: DeleteWebhook
  responses:
    '200':
      description: Deleted the webhook
      content:
        application/json:
          schema:
            properties: {}
            type: object
            description: Construct a type with a set of properties K of type T
            additionalProperties: false
          examples:
            Example 1:
              value: {}
    '400':
      description: Missing webhook ID
      content:
        application/json:
          schema:
            description: |-
              The error body. `name` is null for the statuses that have no name, such as
              404 and 429.
            properties:
              message:
                type: string
              name:
                type: string
                nullable: true
            required:
              - message
              - name
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                message: Missing or invalid parameters.
                name: ValidationError
    '401':
      description: Requires authentication
      content:
        application/json:
          schema:
            description: |-
              The error body. `name` is null for the statuses that have no name, such as
              404 and 429.
            properties:
              message:
                type: string
              name:
                type: string
                nullable: true
            required:
              - message
              - name
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                message: Unauthenticated request.
                name: AuthError
    '404':
      description: Webhook not found
      content:
        application/json:
          schema:
            description: |-
              The error body. `name` is null for the statuses that have no name, such as
              404 and 429.
            properties:
              message:
                type: string
              name:
                type: string
                nullable: true
            required:
              - message
              - name
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                message: Webhook not found
                name: null
    '503':
      description: Webhooks service unavailable
      content:
        application/json:
          schema:
            description: |-
              The error body. `name` is null for the statuses that have no name, such as
              404 and 429.
            properties:
              message:
                type: string
              name:
                type: string
                nullable: true
            required:
              - message
              - name
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                message: Internal server error
                name: ServerError
  description: |-
    Deletes a webhook. This works for every webhook that the team owns,
    including V1 webhooks and webhooks of retired types.
  summary: Delete webhook
  tags:
    - Webhooks
  security:
    - team_api_key: []
  parameters:
    - in: query
      name: webhook_id
      required: true
      description: The webhook ID, for example `wh_abc123`.
      schema:
        type: string
```
