Reten Docs

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

ParameterTypeDescription
idUUIDEvent filter ID.

Behavior

The endpoint validates in this order, and the first check that fails aborts the operation:

  1. Existence — if there is no event filter with that id in the tenant, it responds 404 (Event criteria not found).
  2. Archived — the filter is archived along with its query blocks, and the endpoint responds 204 No Content with 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

StatusDescription
400The id is not a valid UUID.
401Missing or invalid Authorization: Bearer.
403The user lacks the event-criteria:delete permission, or the x-tenant-id is not authorized.
404No event filter with that id exists in the tenant (Event criteria not found).