API BCE /me endpoint: current key, plan and monthly quota
API BCE /me endpoint: returns the key in use, the company, the plan and this month’s usage. The simplest way to monitor your quota from your code.
Endpoints for the Subscriber resource. All calls require authentication and return the standard JSON envelope.
Base URL: https://companybelgium.be/api/v2 · Authentication
Authenticated customer snapshot#
Returns the key, its company, the current plan (monthly quota and hourly rate limit) and the usage of the current period. Does not count against your quota. -1 means unlimited.
This endpoint takes no parameters.
Request
curl https://companybelgium.be/api/v2/me \
-H "X-API-Key: $API_BCE_KEY" \
-H "X-API-Secret: $API_BCE_SECRET"Response
{
"success": true,
"data": {
"keyId": "...",
"keyName": "...",
"source": "...",
"company": {
"id": "...",
"name": "..."
},
"plan": {
"code": "pro",
"name": "...",
"monthlyQuota": 50000,
"hourlyRateLimit": 2000
},
"usage": {
"requestsThisMonth": "...",
"requestsRemaining": "...",
"periodStart": "...",
"periodEnd": "..."
},
"issuedAt": "..."
},
"timestamp": "..."
}▶ Try this request
What to do with /me in API BCE integrations#
The /me route describes the key in use: its company, its plan and the usage of the current period. Because the call does not count against your quota, you can use it freely for operations work.
- Startup check: call
/mewhen your service boots to confirm the credentials work. - Usage dashboard: display
requestsThisMonth,requestsRemaining,periodStartandperiodEnd. - Quota alerts: warn your team when usage passes a threshold you choose, for instance 80 percent.
- Key audit: read
keyNameto confirm which key a given service really uses.
Reading the plan values#
The plan object gives a code, a name, the monthlyQuota and the hourlyRateLimit. However, the value -1 means unlimited. Therefore, handle it before you compute a percentage, otherwise your dashboard shows nonsense. In addition, use periodEnd to tell users when their counter resets.
You can also compare monthlyQuota with the published plans. For example, API Essentiel shows 50,000 and API Pro shows 500,000.
Moreover, /me needs the same headers as any other call. Therefore, a successful answer also proves that your configuration loads the right credentials in each environment. This makes it a natural first step in a deployment checklist.
Using /me as a health probe#
Monitoring tools often call an endpoint every few minutes. If that probe fetched a company record, it would consume quota all day. Instead, point it at /me. As a result, you check both availability and authentication at no quota cost. Still, keep the probe interval reasonable, and alert on 401 responses, since they reveal a revoked or mistyped key.
Planning with usage data#
Usage figures also help with planning. For example, record requestsThisMonth every day and draw the curve. If the trend crosses your monthlyQuota before periodEnd, upgrade in time or slow down batch work. Similarly, the hourlyRateLimit tells you how fast a backfill can run. In addition, store the plan code in your logs, so a support ticket shows at once which limits applied. Finally, run the check for each key in a multi-service setup, since limits are enforced per key.
API BCE /me endpoint FAQ#
Does /me count against my API BCE quota?
No. Calls to /me never count, so it is the safest way to monitor usage.
What does -1 mean in the plan values?
It means unlimited. Treat it as a special case in your calculations and displays.
Why does /me show a different plan than I expected?
The key belongs to a specific company. So, check keyName and company to confirm that the service uses the right key.