Record a usage event
Appends a row to usage_events. Document send/complete already records automatically; this endpoint is for explicit agent metering. Requires usage:write (or a write/admin API token).
POST
/organizations/{organizationSlug}/usageAuthorization
AuthorizationBearer token · headerrequiredPass your API key as a Bearer token. API keys are scoped to specific operations — configure scopes in your organization's Settings → Developer → API Keys.
Path parameters
organizationSlugstringrequiredRequest body
requiredapplication/jsonevent_typestringrequiredquantityintegermin 1 · default: 1
periodstringmetadataobjectResponses
201
Recorded
successbooleanrequiredperiodstringrequired401
Missing or invalid API key
typestringrequiredMachine-readable error code
statusintegerrequiredHTTP status code
titlestringrequiredHuman-readable error message
detailsobjectField-level validation errors
403
Forbidden