Delete Event Filter
Archives (soft delete) an event filter; responds 204 with no body.
DELETE /api/event-criterias/:id
Archives an event filter. On deletion, the record is removed immediately from
the resource table —which is why it stops appearing in
GET /event-criterias/:id (responds 404) and in
GET /event-criterias— and in its place a
recoverable snapshot is kept in the trash for a configurable retention window.
Auth: Required — event-criteria:delete permission
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | UUID | Event filter ID. |
Behavior
The endpoint validates in this order, and the first check that fails aborts the operation:
- Existence — if there is no event filter with that
idin the tenant, it responds404(Event criteria not found). - Archived — the filter is archived along with its query blocks, and the endpoint
responds
204 No Contentwith no body.
Unlike audiences, there is no "not referenced" check: an event filter is not composed with other filters, so it is never anyone's operand and its deletion cannot be blocked by another resource.
Example
curl -X DELETE https://api.reten.ai/api/event-criterias/9f3a1c22-4b7e-4c31-9a8d-2f5e6b7c8d90 \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>" \
-H "x-project-id: <project-id>"
# → HTTP/1.1 204 No Content (empty body)import axios from 'axios';
const id = '9f3a1c22-4b7e-4c31-9a8d-2f5e6b7c8d90';
await axios.delete(
`https://api.reten.ai/api/event-criterias/${id}`,
{ headers: { Authorization: 'Bearer <token>', 'x-tenant-id': '<tenant-id>', 'x-project-id': '<project-id>' } },
);
// The response is 204 with no body; axios does not reject (2xx).Response 204 No Content
Empty body. The filter has been archived.
Error Responses
| Status | Description |
|---|---|
400 | The id is not a valid UUID. |
401 | Missing or invalid Authorization: Bearer. |
403 | The user lacks the event-criteria:delete permission, or the x-tenant-id is not authorized. |
404 | No event filter with that id exists in the tenant (Event criteria not found). |