Track usage event
Track a usage event for a metered feature. Deducts from balance/credits if applicable.
Track a usage event for a metered feature. Deducts from balance/credits if applicable.
ApiKeyAuth In: header
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
^[a-z0-9_]+$1 <= length <= 1001 <= length <= 200date-time[]1 <= length <= 2000 <= value0 <= value0 <= value0 <= valuecurl -X POST "https://commet.co/api/usage/events" \ -H "Content-Type: application/json" \ -d '{ "feature": "api_calls", "externalId": "user_123", "value": 1 }'application/json
application/json
application/json
Track a usage event for a metered feature. Deducts from balance/credits if applicable.
{
"success": true,
"data": {
"id": "string",
"feature": "string",
"value": 0,
"customerId": "string",
"idempotencyKey": "string",
"ts": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
{
"success": false,
"code": "string",
"message": "string",
"details": null
}{
"success": false,
"code": "string",
"message": "string",
"details": null
}{
"success": false,
"code": "string",
"message": "string",
"details": null
}{
"success": false,
"code": "string",
"message": "string",
"details": null
}