# Delete a webhook

Source: https://developers.swell.is/backend-api/webhooks/delete-a-webhook

Delete a webhook.

## Arguments

- `id` (objectId, required): The id of the webhook to delete.

## Example request

`DELETE /:webhooks/:id`

**cURL**

```bash
$ curl https://api.swell.store/:webhooks/662ba123becf7601325cefa3 \
  -u store-id:secret-key \
  -X DELETE
```

**Node**

```javascript
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');

await swell.delete('/:webhooks/{id}', {
  id: '662ba123becf7601325cefa3',
});
```

**PHP**

```php
<?php $swell = new \Swell\Client('store-id', 'secret-key');

$swell->delete('/:webhooks/{id}', [
  'id' => '662ba123becf7601325cefa3',
]);
```

## Example response

```json
{
  "url": "http://localhost:5000",
  "enabled": false,
  "alias": "webhook",
  "description": null,
  "events": [
    "order.created",
    "order.submitted",
    "order.updated"
  ],
  "api": "com",
  "date_final_attempt": null,
  "date_scheduled": null,
  "date_created": "2021-09-27T16:30:11.837Z",
  "date_updated": "2021-10-28T16:04:21.648Z",
  "id": "6151f193ae97e82ccbf6f0a7"
}
```
