Records a usage event for a specific customer and feature. This endpoint is used to track feature usage for billing and quota management purposes.
Usage endpoints are served from https://api-meter.metrifox.com. Other API calls stay on https://api.metrifox.com.Important Notes:
event_id (required) is required for idempotency: You generate a unique UUID per real event. This prevents duplicates if sent multiple times.feature_key (this is required if there is no event_name): The unique key of the metered feature (from dashboard).event_name (optional if feature_key is already provided): One of the event names configured on the feature (e.g., “api_request” or “image_generated”)timestamp (ms) when possible to aid ordering/debugging.The unique customer identifier in your application
Required idempotency key for this event. Must be unique per event.
The name of the event as set up in the Metrifox platform. Either event_name or feature_key is required.
Feature key associated with this usage event. Either event_name or feature_key is required.
The quantity of usage. Defaults to 1 if not provided
Optional credits used for this event
Unix timestamp (in milliseconds) when the event occurred. Defaults to current time if not provided. Supplying this improves ordering and debugging.
Optional metadata to attach to the event