---
title: "Delete events"
method: POST
path: "/events/delete"
tags: ["Events"]
---

# Delete events

`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`

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.

## Request body

- DeleteEventsRequest
  - `event_ids` string[]: EventIDs narrows the deletion to exact event ids. Requires exactly one customer and no feature_ids.
  - `external_customer_ids` string[], required
  - `feature_ids` string[]: FeatureIDs narrows the deletion to the meters these features resolve to.
  - `period_end` string, date-time, required
  - `period_start` string, date-time, required
  - `skip_payload` boolean: 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.

## Response `200`

OK

- DeleteEventsResponse
  - `deleted_events` integer
  - `deleted_meter_usage_rows` integer

## Other responses

- `400`: Invalid request, or a guard refused the deletion
- `403`: Caller lacks the capability, or is a service account
- `409`: A deletion is already in progress for a customer in this request
- `500`: Server error

## Changes

- **2026-10-27** `a448d0ed9888`: 1 info
  - endpoint added
- **2026-10-27** `6415d4e95948`: 1 breaking
  - api path removed without deprecation
- **2026-10-26** `0df3981dc392`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/flexprice/apis/flexprice-api/changes/events/delete/post.md)

---

[API](https://skmtc.dev/flexprice/apis/flexprice-api.md) - [All operations](https://skmtc.dev/flexprice/apis/flexprice-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flexprice/apis/flexprice-api/revisions/e1348d61034c?raw)
