Usage
See this month's allowances and how much is left.
Allowances belong to the organisation, so every workspace in it sees the same figures.
Every path below starts with https://bgum.me/api/v1/workspaces/{workspaceId}. Send your API key in the Authorization header as described in the API overview.
| Operation | Method and path |
|---|---|
| Get usage | GET /usage |
Get usage
GET /usage
Returns the plan and, for each monthly allowance, how much is used, the limit and when it resets.
- Full path
/api/v1/workspaces/{workspaceId}/usage- API key scope
- Any key for the workspace
- Role needed
- Viewer or above
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId |
string | Yes | Your workspace ID, from Settings → Workspace. |
Example request
curl
curl "https://bgum.me/api/v1/workspaces/$WORKSPACE_ID/usage" \
-H "Authorization: Bearer $BGL_API_KEY"
JavaScript
const res = await fetch(`https://bgum.me/api/v1/workspaces/${process.env.WORKSPACE_ID}/usage`, {
headers: {
Authorization: `Bearer ${process.env.BGL_API_KEY}`,
},
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
console.log(data);
Python
import os
import requests
res = requests.get(
f"https://bgum.me/api/v1/workspaces/{os.environ['WORKSPACE_ID']}/usage",
headers={
"Authorization": f"Bearer {os.environ['BGL_API_KEY']}",
},
timeout=30,
)
res.raise_for_status()
print(res.json())
Response
200 OK · application/json
JSON
{
"planCode": "business",
"planName": "Business",
"period": "2026-10",
"lines": [
{
"metric": "LinksCreated",
"used": 2,
"limit": 3000,
"resetsAt": "2026-11-01T00:00:00+00:00",
"remaining": 2998
},
{
"metric": "QrCodesCreated",
"used": 0,
"limit": 1000,
"resetsAt": "2026-11-01T00:00:00+00:00",
"remaining": 1000
}
]
}
Good to know
- limit and remaining are null when the allowance is unlimited.
- Any API key for the workspace can call this, whatever its scopes.
Errors
Any request can also return the general errors: 401 for a missing or wrong key, 403 for a missing scope or plan feature, 404 for an unknown workspace and 429 when you're sending too fast.
Something missing or unclear? Tell us and we'll improve this page.