Skip to main content
POST
/
api
/
usage-events
Ingest usage events
curl --request POST \
  --url https://api.example.com/api/usage-events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "eventId": "ue-12345",
    "schemaName": "AI",
    "eventTime": "2026-03-02T20:53:19Z",
    "accountNumber": "ACC-0000000001",
    "attributes": [
      {
        "name": "model",
        "value": "GPT-5"
      },
      {
        "name": "token",
        "value": "101"
      }
    ]
  }
]
'
{
  "success": true,
  "errorMessage": "<string>",
  "successDetails": [
    {
      "eventId": "<string>"
    }
  ],
  "errorDetails": [
    {
      "eventId": "<string>",
      "errorMessage": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

trace-id
string

Body

application/json
Required array length: 1 - 100 elements
eventId
string
required

unique id of this usage event

Required string length: 36 - 64
schemaName
string
required

the schema you defined in usage event schema for this usage event

eventTime
string
required

time of usage event in ISO format

accountNumber
string
required

the customer account consuming this usage

attributes
object[]
Required array length: 1 - 100 elements

Response

OK

success
boolean
errorMessage
string
successDetails
object[]
errorDetails
object[]