Get Workspace
Get a workspace by ID within an organization.
Endpoint
GET /api/v1/organizations/{org_id}/workspaces/{workspace_id}
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <access_token> |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
org_id | integer | Yes | Organization ID |
workspace_id | integer | Yes | Workspace ID |
Response
Success (200)
{
"success": true,
"data": {
"workspace": {
"id": 1,
"name": "Main Workspace",
"slug": "main-workspace",
"organization_id": 1,
"is_default": true
},
"message": "Workspace retrieved successfully"
},
"message": "Workspace retrieved successfully"
}
Permissions
- Super admin: can get any workspace
- Org admin: can get any workspace in their organization
- Member with read workspace permission: can get any workspace
Features
- Return the workspace details
- Require authentication
- Validate organization and workspace access permissions