⚓️ Portcall

Incrementing metered feature usage (event ingestion)

Record usage events for metered billing and entitlement tracking.

Record usage with meter events:

curl -sS -X POST "$PORTCALL_API_BASE/v1/meter-events" \
  -H "x-api-key: $PORTCALL_API_KEY" \
  -H "content-type: application/json" \
  -d '{"user_id":"user_123","feature_id":"credits","usage":1}'

Rules

  • usage must be a positive integer.
  • user_id and feature_id must exist.
  • Requests that exceed quota return a 400 error.

After writing usage, read entitlement state again to enforce limits in-app.

On this page