---
title: "Create Usage Event"
method: POST
path: "/api/v1/usage-events"
tags: ["Usage Events"]
---

# Create Usage Event

`POST /api/v1/usage-events`

## Request body

- object
  - `usageEvent` object, required
    - `subscriptionId` string, required
    - `amount` integer, required
    - `usageDate` integer — The date the usage occurred. If the usage occurs in a date that is outside of the current billing period, the usage will still be attached to the current billing period. Epoch milliseconds.
    - `transactionId` string, required — A unique identifier for the transaction. This is used to prevent duplicate usage events from being created.
    - `properties` object, nullable — Properties for the usage event. Only required when using the "count_distinct_properties" aggregation type.
    - `priceId` string — The internal ID of the price. Exactly one of priceId, priceSlug, usageMeterId, or usageMeterSlug must be provided.
    - `priceSlug` string — The slug of the price. Exactly one of priceId, priceSlug, usageMeterId, or usageMeterSlug must be provided.
    - `usageMeterId` string — The internal ID of the usage meter. Exactly one of priceId, priceSlug, usageMeterId, or usageMeterSlug must be provided.
    - `usageMeterSlug` string — The slug of the usage meter. Exactly one of priceId, priceSlug, usageMeterId, or usageMeterSlug must be provided.

## Response `200`

Successful response

- object
  - `usageEvent` UsageEventClientSelectSchema, required
    - `id` string, required
    - `createdAt` integer, required — Epoch milliseconds.
    - `updatedAt` integer, required — Epoch milliseconds.
    - `livemode` boolean, required
    - `customerId` string, required
    - `subscriptionId` string, required
    - `usageMeterId` string, required
    - `billingPeriodId` string, nullable — The billing period the usage belongs to. If the usage occurs in a date that is outside of the current billing period, the usage will still be attached to the current billing peirod.
    - `amount` integer, required
    - `usageDate` integer, required — The date the usage occurred. If the usage occurs in a date that is outside of the current billing period, the usage will still be attached to the current billing period. Epoch milliseconds.
    - `transactionId` string, required — A unique identifier for the transaction. This is used to prevent duplicate usage events from being created.
    - `priceId` string, nullable, required
    - `properties` object, nullable — Properties for the usage event. Only required when using the "count_distinct_properties" aggregation type.
    - `pricingModelId` string, required

## Other responses

- `400` — Invalid input data
- `401` — Authorization not provided
- `403` — Insufficient access
- `500` — Internal server error

## Changes

- **2026-01-11** `599bbd902d65` — 1 breaking, 3 info
  - response property `usageEvent/priceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - added the new optional request property `usageEvent/usageMeterId`
  - added the new optional request property `usageEvent/usageMeterSlug`
  - added the required property `usageEvent/pricingModelId` to the response with the `200` status
- **2025-11-25** `71d495f9b7d8` — 2 breaking, 4 info
  - response property `usageEvent/properties` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - removed 'propertyNames' constraint from the `usageEvent/properties` response property for the status `200`
  - added the new optional request property `usageEvent/priceSlug`
  - the request property `usageEvent/priceId` became optional
  - …2 more
- **2025-10-18** `a1eeb4fac4d6` — 11 breaking, 3 warning, 8 info
  - the request property `usageEvent/properties` became not nullable
  - added 'propertyNames' constraint to the request property `usageEvent/properties`
  - the `usageEvent/usageDate` request property type/format changed from `number`/`` to `integer`/``
  - the response property `usageEvent/billingPeriodId` became optional for the status `200`
  - …18 more
- …earlier changes not shown

[Full history](https://skmtc.dev/flowglad/apis/flowglad-api/changes/api/v1/usage-events/post.md)

---

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