Skip to content
gist.link ↗

checkLimit

Query Billing API — POST https://billing.api.gist.link/graphql

THE cross-service limit contract: product apps call this before a billable action and must refuse it when allowed=false (gated orgs are always disallowed; BLOCK meters stop at their cap; OVERAGE meters allow and bill). ROLE_SERVICE (org-bound token) or any org member.

billing:query:checkLimit

The calling IAM key must hold this permission (or a wildcard that covers it: billing:query:* or billing:*) and the access token must have been minted with audience=billing. See Permissions.

type Query {
checkLimit(meterKey: String!): LimitCheck!
}
Argument Type Required Description
meterKey String! Yes —

LimitCheck! — see the Billing types reference.

Terminal window
curl https://billing.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query CheckLimit($meterKey: String!) { checkLimit(meterKey: $meterKey) { meter_key used included limit remaining allowed behavior } }",
"variables": {
"meterKey": "example"
}
}
JSON