Purpose
List all workspaces in an organization (paginated). Used in org dashboard or workspace switcher.
Auth / Scope
User must be a member of the org (org_members).
Headers
Authorization: Bearer <USER_JWT>
X-Page-Token: (for pagination)
Query Parameters
visibility=org (filter)
limit=20 (default: 20, max: 100)
curl --location --request GET 'http://localhost:3000/api/orgs//workspaces' \
--header 'Content-Type: application/json' \
--data-raw '{}'{
"message": "Workspaces retrieved",
"data": {
"workspaces": [
{
"workspaceId": "w-abc",
"name": "Marketing Team",
"visibility": "org",
"memberCount": 15,
"createdAt": "2025-09-01T10:00:00Z"
}
],
"nextPageToken": "eyJsYXN0X2lkIjoidy16eXoifQ=="
}
}