Events

Hard-deletes ingested events and the meter usage they produced for the named customers and period, optionally narrowed by feature or by exact event id. Refused when anything in scope has already been invoiced. Irreversible.

post/events/delete

Request

  • Base URL
    https://us.api.flexprice.io/v1
  • URL
    https://us.api.flexprice.io/v1/events/delete
  • Auth
    API key in header x-api-key

Request body

event_idsstring[]

EventIDs narrows the deletion to exact event ids. Requires exactly one customer and no feature_ids.

external_customer_idsstring[] required
feature_idsstring[]

FeatureIDs narrows the deletion to the meters these features resolve to.

period_endstring date-time required
period_startstring date-time required
skip_payloadboolean

SkipPayload stores the audit row's properties as '' so the deletion leaves no payload copy. Defaults to true: a deletion is usually an erasure, and keeping the payload would defeat it. Send false to retain it.

Example request

{
  "period_end": "2026-03-28T00:00:00Z",
  "period_start": "2026-03-01T00:00:00Z"
}

Response

OK

deleted_eventsinteger
deleted_meter_usage_rowsinteger

Changes