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

# Delete Webhook Endpoint

> Delete a webhook endpoint

# Delete Webhook Endpoint

Permanently deletes a webhook endpoint. This action cannot be undone.

<Warning>
  After deletion, you will no longer receive events for this endpoint. Make
  sure to update your application accordingly.
</Warning>

## Request

<ParamField header="Authorization" type="string" required>
  Bearer token with your API key
</ParamField>

<ParamField path="id" type="string" required>
  The unique identifier of the webhook endpoint to delete
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the deletion was successful
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      ID of the deleted endpoint
    </ResponseField>

    <ResponseField name="deleted" type="boolean">
      Confirmation of deletion
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://api.swiftpay.cx/api/webhooks/wh_abc123 \
    -H "Authorization: Bearer mp_live_your_api_key"
  ```

  ```javascript JavaScript theme={null}
  const endpointId = "wh_abc123";

  const response = await fetch(
     `https://api.swiftpay.cx/api/webhooks/${endpointId}`,
     {
        method: "DELETE",
        headers: {
           Authorization: "Bearer mp_live_your_api_key",
        },
     }
  );

  const result = await response.json();

  if (result.success) {
     console.log("Webhook endpoint deleted");
  }
  ```

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

  endpoint_id = 'wh_abc123'

  response = requests.delete(
      f'https://api.swiftpay.cx/api/webhooks/{endpoint_id}',
      headers={'Authorization': 'Bearer mp_live_your_api_key'}
  )

  result = response.json()
  if result['success']:
      print('Webhook endpoint deleted')
  ```
</RequestExample>

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

  ```json 404 theme={null}
  {
     "success": false,
     "error": {
        "type": "not_found",
        "message": "Webhook endpoint not found",
        "requestId": "req_abc123"
     }
  }
  ```
</ResponseExample>

<Tip>
  Instead of deleting, consider disabling the endpoint with [Update
  Webhook](/api-reference/webhooks/update-endpoint) if you might need it again.
</Tip>
