const url = 'https://platform.fomr.io/v1/usage';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://platform.fomr.io/v1/usage \ --header 'Authorization: Bearer <token>'Returns the plan, the plan limits, what the organization is using, and the live Platform API budget. Spends no API credits.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Default Response
object
The effective subscription plan of the organization.
What the organization is using right now.
object
The Plan Form Count: forms that are not Private Templates and have not been permanently deleted, including forms in Trash.
Completed submissions received since the start of the current month, in UTC.
The live Platform API budget state. Reading it spends nothing.
object
The plan whose numbers the budget is running on right now.
The API Burst policy and its live state.
object
Credits the organization may spend before the API Cooldown starts.
Credits spent in the window that is currently open.
Credits left before the API Cooldown starts.
How long the window lasts. The API Cooldown is the same length.
The API Minute Cap policy and its live state.
object
Credits the organization may spend in one sixty-second window.
Credits spent in the window that is currently open.
Credits left in the current window.
How long the window lasts. Always sixty seconds.
What each kind of call costs in credits.
object
What one ordinary call costs.
What generating a form from a prompt costs.
True when the numbers came from a per-process fallback because the shared counter was unreachable. Treat them as approximate.
Example
{ "plan": "free", "api": { "plan": "free" }}Default Response
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Example
{ "code": "INVALID_INPUT"}Default Response
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Example
{ "code": "INVALID_INPUT"}A rejected call. The organization budget names the policy it rejected the call under; the request floor that bounds hammering sends the envelope alone.
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
The policy that rejected the call.
The plan whose numbers were applied.
The policy limit in credits.
Credits already spent in the open window.
Credits still available under the policy.
What the rejected call would have cost.
How long the policy window lasts.
When the window that rejected the call ends.
Seconds to wait before retrying. Also sent as the Retry-After response header.
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Example
{ "code": "INVALID_INPUT", "policy": "minute", "plan": "free"}Default Response
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Example
{ "code": "INVALID_INPUT"}