Skip to main content
POST
/
billing
/
usageDriver
cURL
curl --request POST \
  --url https://api.valyx.com/billing/usageDriver \
  --header 'Content-Type: application/json' \
  --header 'X-Valyx-Signature: <x-valyx-signature>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "unit": "<string>",
  "productId": "<string>"
}
'
{
  "error": "<string>",
  "message": "<string>",
  "data": {
    "id": "<string>"
  }
}

Headers

X-Valyx-Signature
string
required

Auth key to authenticate the request

Body

application/json
name
string
required

A unique name identifying the usage driver.

description
string
required

Detailed explanation of what this usage driver measures or tracks.

unit
string
required

The unit of measurement for this usage driver (e.g., count, GB, minutes).

productId
string

Optional: ID of the product this usage driver is associated with, if any.

Response

200 - application/json

Success

error
string

Error message, if any. Null if the request was successful.

message
string

Human-readable message describing the result of the operation.

data
object