API Reference
Log In
API Reference

Meter an event

Submit a generic metering event with a flexible payload structure. Use this endpoint to meter custom events that you wish to track in Revenium. The payload should contain any key-value pairs representing metrics to track or rate for usage-based revenue calculation. The key values sent here will be created as 'metering elements' if they do not already exist, and rated according to pricing definitions for the relevant metering element on a product if they do.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The metering event

string
required

The unique identifier of the metering event

payload
object
required

The rating payload as a JSON object containing key-value pairs representing usage metrics to track. For example, a SaaS application might send: { "storageGB": 15.5, "apiCalls": 1250, "computeMinutes": 480 }. If these keys do not already exist in Revenium, each key you send will be automatically configured as a metering element on the relevant data source.

string | null

Optional identifier for the source that represents the feature under which usage charges should be tracked. In the events endpoint, sources typically represent categories for billable units such as features, services, or resources (e.g., 'storageCharges' or 'CpuCharges'). If you wish for the key value pairs you send to be automatically applied to a source that is used in a product to calculate usage-based revenue, you should specify the relevant sourceId here. Sources must be pre-configured in the Revenium platform. The ID can be found on the sources page or retrieved via the list sources endpoint.

string | null

Optional unique identifier for the subscriber/customer associated with this usage event. This credential maps the metered usage to a specific subscription and its associated product pricing rules. Can be any unique identifier from your system (customer ID, subscription ID, API key, etc.) that you've configured as a subscriber credential in the Revenium platform. Visible on the subscriber credentials page in Revenium.

string
enum
Defaults to UNKNOWN

Names the SDK or gateway that sent this data. Used for reporting only. Defaults to 'UNKNOWN'. The values REVENIUM and INTERNAL are reserved for data Revenium creates itself; do not send them.

Headers
string
length between 1 and 255
^[!-~]+$

Optional key that makes retries safe. Revenium stores the response for each key in your account and replays it if you retry with the same key. Reusing a key with a different request body returns 409 idempotency_key_mismatch; retrying while the first request is still in progress returns 409 idempotency_key_in_progress with Retry-After: 1. Must be 1-255 printable ASCII characters; UUID v4 recommended. See https://docs.revenium.io/integrations/idempotency for full behavior.

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*