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

# Delete a webhook subscription

> Permanently delete a webhook subscription and stop all deliveries to it.

Permanently delete a webhook subscription. Deliveries to its URL stop immediately. This cannot be undone. To pause deliveries without deleting, set `is_active` to `false` with [update](/api-reference/webhooks/subscriptions/update) instead.

## Path parameters

| Parameter | Type   | Description                 |
| --------- | ------ | --------------------------- |
| `id`      | string | The webhook subscription ID |

## Response

Returns `204 No Content` with an **empty response body** on success.

## Errors

| Status | Scenario                                                              |
| ------ | --------------------------------------------------------------------- |
| `401`  | Missing or invalid API key                                            |
| `403`  | The API key is read-only and cannot perform write operations          |
| `404`  | No subscription with this ID exists for the shop                      |
| `429`  | [Rate limit](/api-reference/rate-limits) exceeded (6 requests/second) |

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url https://api.mageloyalty.com/v1/webhook-subscriptions/whsub_abc123 \
    --header 'Authorization: <api-key>'
  ```

  ```javascript Node theme={null}
  const response = await fetch(
    "https://api.mageloyalty.com/v1/webhook-subscriptions/whsub_abc123",
    {
      method: "DELETE",
      headers: {
        Authorization: "<api-key>",
      },
    }
  );

  // 204 No Content — response body is empty
  const ok = response.status === 204;
  ```

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

  response = requests.delete(
      "https://api.mageloyalty.com/v1/webhook-subscriptions/whsub_abc123",
      headers={"Authorization": "<api-key>"},
  )

  # 204 No Content — response body is empty
  ok = response.status_code == 204
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init("https://api.mageloyalty.com/v1/webhook-subscriptions/whsub_abc123");
  curl_setopt_array($ch, [
      CURLOPT_CUSTOMREQUEST => "DELETE",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => [
          "Authorization: <api-key>",
      ],
  ]);
  curl_exec($ch);
  // 204 No Content — response body is empty
  $ok = curl_getinfo($ch, CURLINFO_HTTP_CODE) === 204;
  ```
</RequestExample>

<ResponseExample>
  ```text 204 No Content theme={null}
  (empty response body)
  ```

  ```json 404 Not Found theme={null}
  {
    "errors": [
      {
        "status": "404",
        "title": "Not Found",
        "detail": "Webhook subscription 'whsub_abc123' not found"
      }
    ]
  }
  ```
</ResponseExample>
