Skip to content

List workspaces

GET/v1/workspaces

Returns every workspace you are an active member of, newest first, with your role and permissions in each. This endpoint needs no X-Workspace-Slug header.

Without query parameters, every workspace is returned in data. Send page or page_size to paginate. A top-level pagination object is then added next to data, and q filters the results. q is ignored unless page or page_size is present.

Authentication

Send your API key as Authorization: Bearer <token>.

Query parameters

pageinteger

Page number, starting at 1. Values below 1 (or non-numbers) are treated as 1. Sending this enables pagination.

min 1

page_sizeinteger

Items per page. Defaults to 10. Values above 100 are capped at 100. Sending this enables pagination.

Default 10min 1 · max 100

qstring

Case-insensitive substring search across the workspace's name, slug and description. Only applied when paginating.

Response

200

Your workspaces. pagination is only present when page or page_size was sent.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataarray of objects
Show item attributes
uidstringRequired

Unique identifier of the workspace. Used in /v1/workspaces/{workspace_uid}/... paths.

namestringRequired

Display name.

slugstringRequired

Unique slug. Send it in X-Workspace-Slug to act in this workspace.

descriptionstringRequired

Free-text description. Empty when not set.

is_defaultbooleanRequired

Whether this is the owner's default workspace, created at signup. It cannot be deleted.

vm_exec_enabledbooleanRequired

Whether running commands on VMs through the API is allowed. See Update workspace settings.

created_atstring (date-time)Required

When the workspace was created.

updated_atstring (date-time)Required

When the workspace was last changed.

rolestring

Your role in the workspace. Omitted when deleting a workspace.

One ofowneradmindeveloperviewer

permissionsarray of strings

The permissions your role grants. Omitted when deleting a workspace.

One ofworkspace.readworkspace.manageresource.writeruntime.connectsecrets.readsecrets.managemembers.manageaudit.readbilling.readbilling.manageworkspace.transferworkspace.delete

member_countintegerRequired

Number of active members. 0 in the response to deleting a workspace.

paginationobject

Paging details. Only present when page or page_size was sent.

Show attributes
pageintegerRequired

Current page number.

page_sizeintegerRequired

Items per page.

totalintegerRequired

Total number of matching items.

total_pagesintegerRequired

Total number of pages.

Errors

StatusMeaning
401The API key is missing, invalid, expired or revoked.
403You cannot access the workspace, your role does not allow this action, or the account is suspended.

Errors use the standard error format.