API referenceAdmin workspaces
List workspaces with their operational state
Returns every workspace with its plan, limit overrides, and current AI usage, as shown on the admin operations screen. Platform admins only.
GET
apiKeyheader
AuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
Success
application/json- response
data*Example Request
curl -X GET 'https://api.snoze.dev/v1/admin/workspaces'Example Response
{ "data": { "workspaces": [ { "workspaceId": "string", "name": "string", "slug": "string", "lifecycleStatus": "active", "memberCount": 0, "billedPlan": "free", "subscriptionStatus": "none", "effectivePlan": "free", "currentPeriodEnd": "string", "override": { "planOverride": "free", "aiMonthlyBonusMicrousd": 0, "aiRunCapMicrousd": 0, "featureGrants": [ "integrations" ], "reason": "string", "expiresAt": "string", "updatedAt": "string" }, "lastResetAt": "string" } ], "globalAiResetAt": "string", "totalWorkspaces": 0, "truncated": true }}Attach a Polar subscription to a workspace
Links an existing Polar subscription to a workspace, deriving the plan from the subscription's product and recording the supplied `reason`. Platform admins only; a `subscriptionId` that is not present upstream is reported as not found.
Read one workspace's operational state
Returns a single workspace's plan, limit overrides, and AI usage. Platform admins only; an unknown `workspaceId` is reported as not found.