Incrementing metered feature usage (event ingestion)
How to increment usage for metered features
To increment usage for a user's subscribed metered feature, you can use the following API endpoint:
curl -X POST https://api.portcall.com/v1/usage/increment \
-H "X-API-Key YOUR_SECRET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_id": "USER_ID",
"feature_id": "FEATURE_ID",
"amount": 1
}'if the amount is not specified, it will default to incrementing by 1. You can use negative values to decrement usage as well.