API for Get billing premium request usage report for an organization always return 404 instead of summarized report #177233
-
Select Topic AreaQuestion BodyHi, I was trying to get at least summarized report for https://docs.github.com/en/rest/billing/enhanced-billing?apiVersion=2022-11-28#get-billing-premium-request-usage-report-for-an-organization . I know page saying that detailed reports are not available, but I awaited mentioned summarized reports. But I'm aways getting just following response
is there any other endpoint for summarized reports? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Beta Was this translation helpful? Give feedback.
-
|
Hi, The 404 Not Found response you’re seeing usually occurs for one of these reasons: Endpoint availability The endpoint you referenced (GET /orgs/{org}/settings/billing/enhanced_premium) is specific to GitHub Enterprise or Premium plans. If your organization doesn’t have the appropriate plan enabled, GitHub will return 404. Access permissions You need to be an organization owner to access billing reports. Ensure your token has the scope: read:org Personal access tokens without proper scopes will also return 404. Endpoint limitations Currently, GitHub only provides detailed usage reports via this endpoint. There is no separate endpoint for summarized reports in the REST API. Summarized usage is generally available through the web UI under Organization Settings → Billing → Usage. ✅ Workaround for summarized report via API: You can fetch the detailed usage report from the endpoint and then aggregate the data yourself (e.g., by day, repository, or user) to produce a summarized version. References: Enhanced Billing API Documentation GitHub REST API Permissions |
Beta Was this translation helpful? Give feedback.
-
|
That 404 response usually means the endpoint isn’t active for your organization yet, even if you’re on the enhanced billing system. GitHub is rolling out the new billing APIs gradually, and some orgs still get 404s until their billing backend is fully migrated. First make sure your token includes both If the scopes and permissions are correct and it still fails, the only option right now is to use the web interface under Organization Settings → Billing → Usage. That’s currently the only place where the summarized report appears for orgs that don’t yet have the API endpoint enabled. You can confirm whether your org is on the enhanced billing backend by checking if “Budgets” appear instead of “Spending limits” in your billing UI. If that’s the case, open a GitHub Support ticket to request API access to the enhanced billing endpoints for your organization. If this helped clear up what’s happening, please mark the answer as helpful so others can find it easily. |
Beta Was this translation helpful? Give feedback.
-
|
I have finally find a problem so closing discussion. Mistakenly I had used on some calls classic token (which worked), but for billing was used fine-grained token. Unfortunately, when token is created under user, there is selection who is owner and I have selected my user, not organization, therefore "Administration" permissions wasn't for org, but just for repositories and no organization level permissions were applied. |
Beta Was this translation helpful? Give feedback.


I have finally find a problem so closing discussion. Mistakenly I had used on some calls classic token (which worked), but for billing was used fine-grained token. Unfortunately, when token is created under user, there is selection who is owner and I have selected my user, not organization, therefore "Administration" permissions wasn't for org, but just for repositories and no organization level permissions were applied.