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
usagemust be a positive integer.user_idandfeature_idmust exist.- Requests that exceed quota return a
400error.
After writing usage, read entitlement state again to enforce limits in-app.