Workspaces API
Base path: /api/workspaces
Workspaces are the top-level tenancy unit. Every extension installation, capability registration, and event subscription is scoped to a workspace.
Create Workspace
Requires
ADMINrole.
http
POST /api/workspaces
Content-Type: application/jsonRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
key | string | ✅ | Unique machine-readable key (e.g. acme). Used in workspace DB names. |
name | string | ✅ | Human-readable display name |
Example
bash
curl -X POST http://localhost:8080/api/workspaces \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{"key": "acme", "name": "Acme Corp"}'Response 200 OK
json
{
"code": "SUCCESS",
"data": {
"id": "ws-uuid-...",
"key": "acme",
"name": "Acme Corp",
"createdAt": "2026-04-13T01:00:00Z"
}
}List Workspaces
Returns all workspaces the current user has access to.
http
GET /api/workspacesGet Workspace
Requires
ADMINrole or workspace membership.
http
GET /api/workspaces/{workspaceId}Members
Add Member
Requires
ADMINrole or workspaceADMINrole.
http
POST /api/workspaces/{workspaceId}/members
Content-Type: application/jsonRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
userId | string | ✅ | ID of the user to add |
role | string | ✅ | Workspace role (e.g. ADMIN, MEMBER) |
Example
bash
curl -X POST http://localhost:8080/api/workspaces/ws-uuid/members \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{"userId": "user-uuid", "role": "MEMBER"}'List Members
Requires
ADMINrole or workspace membership.
http
GET /api/workspaces/{workspaceId}/membersRemove Member
Requires
ADMINrole or workspaceADMINrole.
http
DELETE /api/workspaces/{workspaceId}/members/{userId}User Management
Base path: /api/admin/users
All endpoints require
ADMINrole.
Create User
http
POST /api/admin/users
Content-Type: application/jsonRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | ✅ | Unique email address |
fullName | string | ✅ | Display name |
password | string | ✅ | Initial password |
roles | string[] | ✅ | Platform roles: ADMIN, USER |
List Users
http
GET /api/admin/usersGet User
http
GET /api/admin/users/{userId}Update User
http
PUT /api/admin/users/{userId}
Content-Type: application/jsonDelete User
http
DELETE /api/admin/users/{userId}