Update Usage Counters
Updates usage counters without performing a full access check. This is useful for tracking usage after access has already been verified, or for batch counter updates.
Unlike access checks, this endpoint only updates counters and returns a simple success response.
User Identity
You can identify users in three ways (only one should be specified per request):
anonymousIdentifier: For anonymous/unauthenticated usersuserJwt: JWT token for authenticated usersuserIdentifier: Direct user ID (requires secret key)
Authorization
ApiKeyAuth API key authentication. Use secret keys (sk_*) for full access or public keys (pk_*) for limited access.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.monetizationos.com/api/v1/counter-updates" \ -H "Content-Type: application/json" \ -d '{ "identity": { "anonymousIdentifier": "anon_session_789" }, "counterId": "default:feat_123456.requests", "update": 1 }'{
"status": "success"
}{
"status": "error",
"statusCode": 400,
"message": "Invalid JSON body"
}{
"status": "error",
"statusCode": 401,
"message": "Invalid API key"
}{
"status": "error",
"statusCode": 404,
"message": "Organization not found"
}{
"status": "error",
"statusCode": 500,
"message": "Internal server error"
}