v61

latestOpenAPI 3.1.0Apache 2.0raw.githubusercontent.com2026-08-018131,3812.6 MB
Metering Events

List metering events

Pre-release Endpoint This endpoint is currently in beta and is subject to change.

List ingested events.

get/v3/openmeter/events

Query parameters

sizeinteger

The number of items to include per page.

afterstring

Request the next page of data, starting with the item after this parameter.

beforestring

Request the previous page of data, starting with the item before this parameter.

Filter events returned in the response.

To filter events by subject add the following query param: filter[subject][eq]=customer-1

{
  "customer_id": "01G65Z755AFWAKHE12NY0CQ9FH",
  "time": {
    "eq": "2022-03-30T07:20:50Z"
  },
  "ingested_at": {
    "eq": "2022-03-30T07:20:50Z"
  },
  "stored_at": {
    "eq": "2022-03-30T07:20:50Z"
  }
}
sortstring

The asc suffix is optional as the default sort order is ascending. The desc suffix is used to specify a descending order. Multiple sort attributes may be provided via a comma separated list. JSONPath notation may be used to specify a sub-attribute (eg: 'foo.bar desc').

Example:created_at desc

Sort events returned in the response. Supported sort attributes are:

  • time (default)
  • ingested_at
  • stored_at

When omitted, events are sorted by time desc (most recent first). When a sort field is provided without a suffix, it sorts descending. Append the asc suffix to sort ascending, or the desc suffix to sort descending.

Response

Cursor paginated response.

Example response

{
  "data": [
    {
      "event": {
        "id": "5c10fade-1c9e-4d6c-8275-c52c36731d3c",
        "source": "service-name",
        "specversion": "1.0",
        "type": "prompt",
        "subject": "customer_key",
        "time": "2023-01-01T01:01:01.001Z"
      },
      "customer": {
        "id": "01G65Z755AFWAKHE12NY0CQ9FH"
      },
      "ingested_at": "2023-01-01T01:01:01.001Z",
      "stored_at": "2023-01-01T01:01:02.001Z"
    }
  ],
  "meta": {
    "page": {
      "size": 10
    }
  }
}