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

# Delete Webhook

> Delete a webhook and all its delivery logs

## Overview

Delete a webhook endpoint. This also deletes all delivery logs associated with the webhook. This action cannot be undone.

<Info>
  Pro webhook setup and configuration changes are support-managed. Contact [support@daya.co](mailto:support@daya.co) if you need to remove a webhook endpoint from your Pro account.
</Info>

## Authentication

<ParamField header="X-Api-Key" type="string" required>
  Your API key with Write scope

  ```
  X-Api-Key: daya_sk_YOUR_API_KEY
  ```
</ParamField>

## Path Parameters

<ParamField path="id" type="string" required>
  Webhook ID (UUID)

  **Example:** `770e8400-e29b-41d4-a716-446655440000`
</ParamField>

## Request Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url 'https://api.pro.daya.co/public/v1/webhooks/770e8400-e29b-41d4-a716-446655440000' \
    --header 'X-Api-Key: daya_sk_YOUR_API_KEY'
  ```

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

  const response = await fetch(
    `https://api.pro.daya.co/public/v1/webhooks/${webhookId}`,
    {
      method: 'DELETE',
      headers: { 'X-Api-Key': 'daya_sk_YOUR_API_KEY' }
    }
  );

  const data = await response.json();
  console.log('Deleted:', data.success);
  ```

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

  webhook_id = '770e8400-e29b-41d4-a716-446655440000'
  headers = {'X-Api-Key': 'daya_sk_YOUR_API_KEY'}

  response = requests.delete(
      f'https://api.pro.daya.co/public/v1/webhooks/{webhook_id}',
      headers=headers
  )

  result = response.json()
  print(f"Deleted: {result['success']}")
  ```

  ```go Go theme={null}
  package main

  import (
      "encoding/json"
      "fmt"
      "net/http"
  )

  func main() {
      req, _ := http.NewRequest("DELETE", "https://api.pro.daya.co/public/v1/webhooks/770e8400-e29b-41d4-a716-446655440000", nil)
      req.Header.Set("X-Api-Key", "daya_sk_YOUR_API_KEY")

      client := &http.Client{}
      resp, err := client.Do(req)
      if err != nil {
          panic(err)
      }
      defer resp.Body.Close()

      var result map[string]interface{}
      json.NewDecoder(resp.Body).Decode(&result)
      fmt.Println("Deleted:", result["success"])
  }
  ```
</CodeGroup>

## Response

<ResponseField name="success" type="boolean" required>
  Indicates if the request was successful
</ResponseField>

<ResponseField name="message" type="string" required>
  Human-readable response message
</ResponseField>

### Success Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "success": true,
    "message": "Webhook deleted successfully",
    "data": null,
    "timestamp": "2024-01-15T12:00:00Z"
  }
  ```
</ResponseExample>

## Error Responses

<ResponseExample>
  ```json 400 Bad Request - Invalid ID theme={null}
  {
    "success": false,
    "message": "Validation error",
    "error": {
      "code": "VALIDATION_ERROR",
      "message": "Invalid webhook ID format"
    }
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "success": false,
    "message": "Webhook not found",
    "error": {
      "code": "WEBHOOK_NOT_FOUND",
      "message": "No webhook found with the specified ID"
    }
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "success": false,
    "message": "Unauthorized",
    "error": {
      "code": "API_KEY_INVALID",
      "message": "The provided API key is invalid"
    }
  }
  ```
</ResponseExample>

<Warning>
  **This action is permanent.** All delivery logs for this webhook will be deleted and cannot be recovered.
</Warning>

## Rate Limits

* **100 requests per minute** per API key

## Next Steps

<CardGroup cols={2}>
  <Card title="Create Webhook" icon="plus" href="/pro/api-reference/create-webhook">
    Create a new webhook
  </Card>

  <Card title="List Webhooks" icon="list" href="/pro/api-reference/list-webhooks">
    View all webhooks
  </Card>
</CardGroup>
