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

# Delete Event

> Delete a specific event by its ID

## Overview

This endpoint allows you to delete a previously created event from Cometly. Once deleted, the event data will be removed from your tracking and reporting.

This endpoint implements idempotent delete behavior - attempting to delete an event that doesn't exist will still return a success response (200).

## Path Parameters

**event\_id** `string` *required*

The unique identifier of the event to delete

## Response

### Success Response

**status** `number`

HTTP status code (200)

**message** `string`

Success message confirming the event was deleted

### Error Response

**message** `string`

Error description explaining what went wrong

## Example Requests

```bash cURL theme={null}
curl -X DELETE https://app.cometly.com/public-api/v1/events/123456 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"
```

```javascript JavaScript theme={null}
const eventId = '123456';
const response = await fetch(`https://app.cometly.com/public-api/v1/events/${eventId}`, {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  }
});

const data = await response.json();
```

```php PHP theme={null}
<?php
$eventId = '123456';
$url = 'https://app.cometly.com/public-api/v1/events/' . $eventId;
$headers = [
    'Authorization: Bearer YOUR_API_KEY',
    'Accept: application/json',
    'Content-Type: application/json'
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);
?>
```

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

event_id = '123456'
url = f'https://app.cometly.com/public-api/v1/events/{event_id}'
headers = {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
}

response = requests.delete(url, headers=headers)
```

## Status Codes

| Status Code | Description |
| - | - |
| 200 | Event successfully deleted (or already doesn't exist) |
| 401 | Missing or invalid API key |
| 403 | API key doesn't have permission or subscription is inactive |
| 422 | Invalid event ID provided |
| 429 | Too many requests - rate limit exceeded. See [Rate Limiting](https://docs.cometly.com/introduction/rate-limiting.md) |

## Notes

* **Rate Limit**: This endpoint has a limit of **60 requests per minute** per Space. See [Rate Limiting](https://docs.cometly.com/introduction/rate-limiting.md) for details.

> [!NOTE]
>
> Deleting an event is permanent and cannot be undone. Make sure you have the correct event ID before deleting.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.