Skip to main content
POST
Record meter event

Authorizations

X-API-Key
string
header
required

API key for machine-to-machine authentication

Headers

X-CostGraph-Tenant-ID
string

Tenant UUID. Required for a signed-in user's bearer token. A tenant-scoped API key or OAuth token supplies its tenant when this header is omitted.

Body

application/json

Meter event details

event_name
enum<string>
required

CostGraph meter to increment. Request meters count Pricing API or AI assistant requests. vm_metrics_only_counts records VM metrics-only usage. Compute and managed-spend meters are calculated from cost data and return 400 here.

Available options:
pricing_api_requests,
chat_api_requests,
vm_metrics_only_counts
Example:

"pricing_api_requests"

operation
string
required

Label for the activity, such as the Pricing API path. This is free text, not an increment or replace command. The latest call replaces the label on the monthly ledger line.

Example:

"/pricing/compute"

value
integer
required

Positive count to add, not a monetary amount or a cumulative total. Use 1 for one request. Repeating the same request adds the count again.

Required range: x >= 1
Example:

1

resource_id
string<uuid>

Resource UUID for VM metrics-only usage. Omit for request meters so requests accumulate on the same monthly line.

resource_type
string

Label for the resource type or request meter. For Pricing API requests, use pricing_api_requests. This label does not change the meter's price.

Example:

"pricing_api_requests"

Response

Created

message
string
required
Example:

"some message"

status
string
required
Example:

"success"

data
object