Skip to content

Workspace API

Get Credits

Get the workspace's rolling 24-hour credit usage with GET /workspace/credits.

Endpoint
GET https://api.parcelengineering.com/api/v1/workspace/credits

Returns the workspace’s credit usage for the trailing 24-hour rolling window: how many credits have been consumed, how many remain, and what the ceiling is.

Get credits costs 0 credits. It never throttles, so a workspace at its credit ceiling can always check its own usage.

Query parameters

ParameterTypeRequiredDescription
workspace_idstring (UUID)NoOverride the workspace resolved from your API key. Useful for admin tooling.

Example

Get credit usage
curl https://api.parcelengineering.com/api/v1/workspace/credits \
-H "Authorization: Bearer pcl_your_api_key"

Response

Response
{
"data": {
"plan": "pro",
"remaining": 247500,
"ceiling": 250000,
"used": 2500,
"window_hours": 24
},
"metadata": { "credits": 0 }
}

Response fields

FieldTypeDescription
data.planstringThe workspace’s effective plan (e.g. "pro").
data.remainingintegerCredits remaining in the current rolling window. Computed as ceiling - used, clamped at 0.
data.ceilingintegerMaximum credits the workspace may consume per rolling window. 250000 on Pro.
data.usedintegerCredits consumed in the trailing window_hours-hour window.
data.window_hoursintegerLength of the rolling rate-limit window in hours. Always 24.
metadata.creditsintegerAlways 0.

About remaining

remaining always means the residual of the rolling 24-hour rate-limit window. If a monthly purchased-allowance model is introduced in the future, it will be exposed as a separate, additive field. The meaning of remaining will not change.

Errors

StatusCodeDescription
403forbiddenThe workspace is not on the Pro plan.