Start measuring and billing something your customers use.
Endpoint
Request body
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Required | Shown on invoices. |
event_name | string | Required | Lowercase letters, digits and underscores. Fixed once created. |
aggregation | enum | Required | sum, count or last. |
window | enum | Optional | none (the default), hour or day. |
customer_key | string | Required | The payload key with your customer's ID. |
value_key | string | Required | The payload key with the amount. |
unit_singular | string | Required | Such as token. |
unit_plural | string | Required | Such as tokens. |
currency | string | Required | usd. Fixed once created. |
pricing | object | Required | The model and its amounts. |
description | string | Optional | For your team. |