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

# Delete Webhook

> Delete a webhook endpoint

## Request

Permanently delete a webhook endpoint. Events will no longer be sent to this URL.

<Warning>
  Deleting a webhook is permanent. You will need to create a new webhook to resume receiving events.
</Warning>

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication. Format: `Bearer YOUR_API_KEY`
</ParamField>

### Path Parameters

<ParamField path="webhook_id" type="string" required>
  The unique identifier of the webhook to delete (e.g., `wh_abc123`)
</ParamField>

## Response

Returns a confirmation of deletion.

<ResponseField name="id" type="string">
  The ID of the deleted webhook
</ResponseField>

<ResponseField name="deleted" type="boolean">
  Always `true` on success
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://api.ringyo.ai/v1/webhooks/wh_abc123 \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.ringyo.ai/v1/webhooks/wh_abc123',
    {
      method: 'DELETE',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
      },
    }
  );

  const result = await response.json();
  // { id: 'wh_abc123', deleted: true }
  ```

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

  response = requests.delete(
      'https://api.ringyo.ai/v1/webhooks/wh_abc123',
      headers={'Authorization': 'Bearer YOUR_API_KEY'}
  )

  result = response.json()
  # {'id': 'wh_abc123', 'deleted': True}
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "id": "wh_abc123",
    "deleted": true
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "error": {
      "code": "webhook_not_found",
      "message": "The specified webhook does not exist"
    }
  }
  ```
</ResponseExample>

## Error Codes

| Code                | Description                                      |
| ------------------- | ------------------------------------------------ |
| `webhook_not_found` | The specified webhook\_id does not exist         |
| `unauthorized`      | You don't have permission to delete this webhook |

## Alternative: Disable Instead

Instead of deleting, you can disable a webhook by updating its status:

```bash theme={null}
curl -X PATCH https://api.ringyo.ai/v1/webhooks/wh_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "inactive"}'
```

This preserves the webhook configuration so you can re-enable it later.
