Usage records
Create usage record
Report usage against a metered subscription.
POST/v1/subscriptions/{subscription_id}/usage_records
Parameters
| Parameter | Description |
|---|---|
| subscription_idstring · pathrequired | No description in the spec. |
| quantityintegerrequired | Between 1 and 1000000. |
| identifierstring | nulloptional | At most 255 characters. |
| metadataobject | nulloptional | At most 50 keys. |
| occurred_atinteger | nulloptional | Minimum 0. |
Returns
Returns an UsageRecordResponse object.
Errors
| Status | Cause |
|---|---|
| 401 | Missing or invalid API key. |
| 403 | Key is missing the usage_records:write scope. |
| 404 | No such object, or it belongs to the other mode. |
| 422 | Validation Error |
| 429 | Rate limited. Back off and retry. |
Other usage records operations
- List usage records GET /v1/subscriptions/{subscription_id}/usage_records
- Get usage summary GET /v1/subscriptions/{subscription_id}/usage_summary
BillKit