Skip to main content
POST
/
v1
/
sdk
/
meter-events
Record a meter event
curl --request POST \
  --url https://api.example.com/v1/sdk/meter-events \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerId": "cus_ABC123",
  "meterName": "requests",
  "properties": {
    "endpoint": "/api/v1/search",
    "region": "us-east-1"
  },
  "timestamp": "<string>",
  "value": 1
}
'
{
  "success": true
}

Body

application/json
customerId
string
required

Customer reference

Example:

"cus_ABC123"

meterName
string
required

Meter name to record against

Example:

"requests"

properties
object

Arbitrary key-value tags

Example:
{
"endpoint": "/api/v1/search",
"region": "us-east-1"
}
timestamp
string

ISO 8601 timestamp (defaults to now)

value
number
default:1

Numeric value (default 1)

Example:

1

Response

Event recorded

success
boolean
Example:

true