Skip to main content
MUTATION
deprecated
createUsageMeasurement(usageMeasurement: UsageMeasurementCreateInput!): UsageMeasurementWithCurrentUsage!
Deprecated query, use `reportUsage` instead

Arguments

usageMeasurement

Input for creating a usage measurement

createdAt
DateTime!

Timestamp of when the record was created

The optimistic balance of the credit wallet (currency) that this feature consumes from, in credit units. It is the per-currency total shared across every feature drawing on that currency — not this feature’s individual consumption — and reflects usage before async reconciliation. Populated only for credit-backed features.

currentUsage
Float

The current measured usage value

customerId
String!

Customer id

environmentId
String!

The unique identifier for the environment

featureId
String!

Feature id

id
UUID!

Unique identifier for the entity

nextResetDate
DateTime
deprecated

The date when the next usage reset will occur

renamed to usagePeriodEnd
resourceId
String

The customer resource this usage applies to. Optional — only required if the customer has multiple resources (for example, one subscription per workspace or site) and usage needs to be tracked separately per resource; omit it to report usage at the customer level.

timestamp
DateTime!

Timestamp

usagePeriodEnd
DateTime

The end date of the usage period in which this measurement resides (for entitlements with a reset period)

usagePeriodStart
DateTime

The start date of the usage period in which this measurement resides (for entitlements with a reset period)

value
Float!

The usage measurement record

Mutation
Variables
Response