Real-time usage balance API
So an external dashboard could accurately display something like “3 of 4 uses remaining” along with the reset date.
Thank you for reaching out!
You can use our existing API to get the information needed for this, then calculate the remaining balance and next reset date in your dashboard.
For a customer with a regular monthly allowance:
-
Get their current usage with
GET /v1/studio/user/{email}. This returns their usage so far, extra uses, subscription dates, and associated access-group information. -
Get their allowance with
GET /v1/studio/access-group/{access_group_id}. This returns the allowance amount and how often it resets. -
Calculate the balance and reset date. For example, a customer with 4 monthly uses, 1 used, and no extra uses would have “3 of 4 uses remaining.” You can work out the next reset date from their renewal interval and subscription date.
-
Keep the display updated by requesting fresh usage information when the dashboard opens and after a completed tool use. You can temporarily save the allowance details, so most refreshes only need the user request from step 1. Refresh those saved details periodically and when the customer changes plans.
Make these requests through your website’s backend using a Workspace API key, available in your workspace settings. You can find the endpoint details in our API documentation. Normal API-call charges apply, so keep that in mind when choosing how frequently to refresh.
This approach covers standard recurring member allowances. Trials, guest usage, and other allowance types may require additional information or handling.
I’ll bring your feature request to the team for consideration. A single endpoint that returns the remaining balance and next reset date would make this simpler. For now, combining the existing user and access-group endpoints is the available workaround.