cURL
Usage
Check Access & Record
Checks if a customer can use a feature and records the usage in one call. If access is granted the usage is recorded; if not, nothing happens.
POST
cURL
Usage endpoints are served from https://api-meter.metrifox.com. Other API calls stay on https://api.metrifox.com.For example, before a customer generates an AI image, check they have quota and record the generation in a single call.
If the action doesnโt complete โ or the customer ends up using a different amount โ correct the
recorded usage with Adjust a Usage Event.
Authorizations
Body
application/json
The unique customer identifier in your application.
Required idempotency key. The usage is recorded at most once per event_id, so retries are safe.
Feature to check and record against. Either feature_key or event_name is required.
Event name configured on the feature. Either event_name or feature_key is required.
Quantity to check and record. Defaults to 1.
Optional credits used for this event (prepaid features).
Response
Access checked. When can_access is true the usage was recorded.

