Get workspace
This API endpoint retrieves workspace details like seat counts, billing cycles, and security policies. You need a Business plan or higher and an API key with workspace read permission.
Workspace owners and tools that need to check workspace configuration and policy details automatically.
Do this, in order
- 1
Generate an API key at lovable.dev/settings/api-keys with the workspaces:read or workspaces:write scope.
Requests without this specific scope are rejected with an insufficient scope error.
- 2
Send a GET request to https://api.lovable.dev/v1/workspaces/{workspace_id} passing your key in the Lovable-API-Key header and setting Lovable-Version to 2026-09-11.
This authenticates your request and locks the API behavior to a stable version.
- 3
Read the returned JSON response to view your workspace configuration, security policies, seat counts, and billing period.
This gives you automated visibility into how your workspace is set up and governed.
Paste this into your project
Create a workspace overview component that fetches data from GET https://api.lovable.dev/v1/workspaces/{workspace_id} using an input Lovable API key. Display the seat count, billing cycle, project count, and security policies in clean summary cards, showing a subtle note if usage details are returned as null.Words decoded
- workspaces:read
- A permission setting attached to an API key that lets it view workspace settings and information.
- Eventually consistent
- Data that updates within moments rather than instantly after a change occurs.
Where people get stuck
- Calling this endpoint requires a Business plan or higher, returning a 402 payment required error on lower tiers.
- Usage statistics will return as null if your credentials lack specific permission to view workspace usage.
- API keys are tied to a single workspace, so requesting a different workspace ID will return a 404 not found error.
- The project count (num_projects) is eventually consistent and may lag slightly behind recent additions or deletions.
- Member lists and roles are not included in this endpoint and must be fetched from the dedicated members endpoint.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.