# Delete Event

> DELETE /events/:id — delete a custom event definition.

`DELETE /events/:id`

Deletes a [custom event](https://www.sendping.co/docs/automations/custom-events) definition. Deleting the definition removes its payload schema, so future [sends](https://www.sendping.co/docs/api/events-send) of the same event name are no longer validated — it does not affect automations that trigger on the event name.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | The ID of the event definition to delete. |

**Node.js**

```js
import { SendPing } from 'sendping';

const mb = new SendPing('mb_xxxxxxxxx');

const { data, error } = await mb.events.remove('b6d24b8e-af0b-4c3c-be0c-359bbd97381e');
console.log({ data, error });
```

**Ruby**

```ruby
require "sendping"

SendPing.api_key = "mb_xxxxxxxxx"

SendPing::Events.delete("b6d24b8e-af0b-4c3c-be0c-359bbd97381e")
```

**PHP**

```php
<?php
require 'vendor/autoload.php';

use SendPing\SendPing;

$sendping = SendPing::client('mb_xxxxxxxxx');

$sendping->events->remove('b6d24b8e-af0b-4c3c-be0c-359bbd97381e');
```

**Python**

```python
import sendping

sendping.api_key = "mb_xxxxxxxxx"

sendping.Events.remove("b6d24b8e-af0b-4c3c-be0c-359bbd97381e")
```

**Go**

```go
import "github.com/shekhu10/sendping-sdks/sendping-go"

client := sendping.NewClient("mb_xxxxxxxxx")

removed, err := client.Events.Remove("b6d24b8e-af0b-4c3c-be0c-359bbd97381e")
```

**Rust**

```rust
use sendping::SendPing;

let mb = SendPing::new("mb_xxxxxxxxx");

let _removed = mb.events.remove("b6d24b8e-af0b-4c3c-be0c-359bbd97381e").await?;
```

**Java**

```java
import co.sendping.SendPing;
import co.sendping.SendPingResponse;

SendPing sendping = new SendPing("mb_xxxxxxxxx");

SendPingResponse response = sendping.events().remove("b6d24b8e-af0b-4c3c-be0c-359bbd97381e");
```

**.NET**

```csharp
using SendPing;

ISendPing sendping = SendPingClient.Create("mb_xxxxxxxxx");

var resp = await sendping.EventDeleteAsync("b6d24b8e-af0b-4c3c-be0c-359bbd97381e");
```

**cURL**

```bash
curl -X DELETE 'https://www.sendping.co/api/events/b6d24b8e-af0b-4c3c-be0c-359bbd97381e' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

**CLI**

```bash
sendping events delete b6d24b8e-af0b-4c3c-be0c-359bbd97381e
```

### Response

```json
{
  "object": "event",
  "id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e",
  "deleted": true
}
```

An unknown id returns `404 not_found`. See [Errors](https://www.sendping.co/docs/api/errors).
