---
title: "Bulk Insert Usage Events"
method: POST
path: "/api/v1/usage-events/bulk"
tags: ["Usage Events"]
---

# Bulk Insert Usage Events

`POST /api/v1/usage-events/bulk`

Create multiple usage events in a single request. Supports priceId, priceSlug, usageMeterId, or usageMeterSlug for each event. Exactly one identifier type must be provided per event.

## Request body

- object
  - `usageEvents` 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
  - `usageEvents` 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 `usageEvents/items/priceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - added the new optional request property `usageEvents/items/usageMeterId`
  - added the new optional request property `usageEvents/items/usageMeterSlug`
  - added the required property `usageEvents/items/pricingModelId` to the response with the `200` status
- **2025-11-25** `71d495f9b7d8` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/flowglad/apis/flowglad-api/changes/api/v1/usage-events/bulk/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)
