Skip to main content
DELETE
Delete events

Authorizations

Authorization
string
header
required

An API key that starts with cs_sk_, created under API and MCP, API keys. A key covers every site of its workspace or a chosen list, and carries permissions per resource (Analytics, Revenue and payments, Goals and events, Funnels, Sites, Notes, Alerts) and extras (Visitor details, Raw events export, Team members, Workspace name, See API keys, Manage API keys). A change acts for the key's creator, with their current role. A request outside them answers 403 naming the missing permission.

Path Parameters

siteId
string
required

The site's id, from GET /sites.

Query Parameters

name
string

The event name, exactly as GET /events lists it.

goalId
string<uuid>

Or a goal's id: deletes the events of that goal. A page goal has no events to delete.

from
string
required

Start: a day (YYYY-MM-DD, in the site's timezone) or an ISO timestamp, inclusive.

to
string
required

End: a day (inclusive, the whole day) or an ISO timestamp (exclusive).

Response

Done.

deleted
integer
required
more
boolean
required
filter
object
required

The filter applied, with the range as ISO timestamps.