POST
/
v1
/
c
/
usage
/
bulk

This endpoint allows you to upload a significant volume of usage events for multiple customers simultaneously. For detailed instructions and best practices on implementation, please refer to the Metering Guide.

The endpoint conducts preliminary validation immediately and a more in-depth validation later during the creation of billing events. If any issues are detected during the initial validation, they will be communicated in the response body, with the index corresponding to the erroneous entry. A 4xx error indicates an issue with the data you provided and should not be retried. Entries that pass validation do not return any feedback and can be deemed as successfully committed. In case of a failure (5xx) or connection issues, we recommend implementing an exponential back-off retry strategy.

Rate limits

This endpoint is designed for periodic uploads of (pre-)aggregated usage data in larger batches. By default, we guarantee a throughput capacity of 100 requests and 150,000 usage events per minute, per customer. However, our infrastructure is capable of scaling significantly beyond these limits. If your application’s demands approach or exceed these constraints, please get in touch with us.

Authorizations

wb-key
string
headerrequired

Body

application/json · object[]
customer_id
string
required

Unique identifier of an object. Consists of object class prefix and a UUID

feature_slug
string
required

Slug of the feature usage is reported for

is_absolute
boolean | null

Setting this to true would discard all events with timestamp preceding this event, and will use this event's units as zero value for usage in the current billing period

metadata
object

Any metadata you wish to associate with the event Note that both keys and values can only be a string Additionally, please avoid escaping non-ascii symbols

timestamp
string | null

Date for the Usage. When usage period is closed, all usage which timestamp falls between Usage period (Billing period) start and end will be summed.

units
string
required

Amount of units consumed since the last report