List Workspaces
List all workspaces for the given organization.
Endpoint
GET /api/v1/organizations/{org_id}/workspaces
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <access_token> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
org_id | integer | Yes | Organization ID |
Response
Success (200)
{
"success": true,
"data": {
"workspaces": [
{
"id": 1,
"name": "Main Workspace",
"slug": "main-workspace",
"is_default": true
}
],
"total_count": 1,
"message": "Workspaces retrieved successfully"
},
"message": "Workspaces retrieved successfully"
}
Permissions
- Super admin: can list all workspaces
- Org admin: can list all workspaces in their organization
- Member with read workspace permission: can list all workspaces
Features
- Return all workspaces within the organization
- Require authentication
- Validate organization access permissions