---
title: "List raw events"
method: POST
path: "/events/query"
tags: ["Events"]
---

# List raw events

`POST /events/query`

Use when debugging ingestion or exporting raw event data (e.g. support or audit). Returns a paginated list; supports time range and sorting.

## Request body

- GetEventsRequest
  - `end_time` string, date-time — End time of the events to be fetched in ISO 8601 format Defaults to now if not provided
  - `event_id` string — Event ID is the idempotency key for the event
  - `event_name` string — Event name / Unique identifier for the event in your system
  - `external_customer_id` string — Customer ID in your system that was sent with the event
  - `iter_first_key` string — First key to iterate over the events
  - `iter_last_key` string — Last key to iterate over the events
  - `offset` integer — Offset to fetch the events and is set to 0 by default
  - `order` string — Order by condition. Allowed values (case sensitive): asc, desc (default: desc)
  - `page_size` integer — Page size to fetch the events and is set to 50 by default
  - `property_filters` object — Property filters to filter the events by the keys in `properties` field of the event
  - `sort` string — Sort by the field. Allowed values (case sensitive): timestamp, event_name (default: timestamp)
  - `source` string — Source to filter the events by the source
  - `start_time` string, date-time — Start time of the events to be fetched in ISO 8601 format Defaults to last 7 days from now if not provided

## Response `200`

OK

- GetEventsResponse
  - `events` Event[]
    - `customer_id` string
    - `environment_id` string
    - `event_name` string
    - `external_customer_id` string
    - `id` string
    - `properties` object
    - `source` string
    - `timestamp` string
  - `has_more` boolean
  - `iter_first_key` string
  - `iter_last_key` string
  - `offset` integer
  - `total_count` integer

## Other responses

- `400` — Invalid request
- `500` — Server error

## Changes

- **2026-05-18** `f62d8a5fe7cf` — 4 warning
  - removed the optional property `details` from the response with the `400` status
  - removed the optional property `details` from the response with the `500` status
  - added the new `too_many_requests` enum value to the `code` response property for the response status `400`
  - added the new `too_many_requests` enum value to the `code` response property for the response status `500`
- **2026-04-06** `4ded3711f401` — 4 warning, 8 info
  - removed the optional property `error` from the response with the `400` status
  - removed the optional property `error` from the response with the `500` status
  - removed the optional property `success` from the response with the `400` status
  - removed the optional property `success` from the response with the `500` status
  - …8 more
- **2026-04-04** `d1860fe0ee67` — 2 breaking
  - the `end_time` request property type/format changed from `string`/`` to `string`/`date-time`
  - the `start_time` request property type/format changed from `string`/`` to `string`/`date-time`

[Change history](https://skmtc.dev/flexprice/apis/flexprice-api-2/changes/events/query/post.md)

---

[API](https://skmtc.dev/flexprice/apis/flexprice-api-2.md) · [All operations](https://skmtc.dev/flexprice/apis/flexprice-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/flexprice/flexprice-api-2/revisions/da8f268dc77d/schema)
