Skip to content
Seal
Esc
↑↓navigate↵open⌘Jpreview

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}/usage
Authorization
AuthorizationBearer token · headerrequired

Pass 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
organizationSlugstringrequired
Request body
requiredapplication/json
event_typestringrequired
quantityinteger
min 1 · default: 1
periodstring
metadataobject
Responses
201

Recorded

successbooleanrequired
periodstringrequired
401

Missing or invalid API key

typestringrequired

Machine-readable error code

statusintegerrequired

HTTP status code

titlestringrequired

Human-readable error message

detailsobject

Field-level validation errors

403

Forbidden

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://api.seal.nyc/api/v1/organizations/string/usage" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "event_type": "string",
  "quantity": 1,
  "period": "string",
  "metadata": {}
}'
Response
{
  "success": true,
  "period": "string"
}