Forge Usage Events API for publishing billable usage events for Marketplace usage-based pricing
Publishes a billable usage event for the app's Marketplace usage-based pricing (UBP) meter. Only the measurement fields are accepted from the caller. The app, environment, installation, and organisation are resolved from the Forge Proxy Token and are never read from the request body.
This endpoint can be called ad hoc, detached from any invocation, by authenticating in the
forge-proxy-authorization header with as=app and installationId instead of an invocation id.
string
Requiredstring
string
Requirednumber
Requiredinteger
Requiredstring
Usage event accepted and enqueued for processing
1
2
3
4
5
6
7
8
9
10
curl --request POST \
--url '{FORGE_EGRESS_PROXY_URL}/forge/usage' \
--header 'forge-proxy-authorization: Forge as=app,id=invocation-123' \
--header 'Content-Type: application/json' \
--data '{
"metricType": "COUNTER",
"usageCount": 1,
"usageTimestamp": 1724064000000,
"userAaid": "5ee0a774d4c7fd0abb1db873"
}'Rate this page: