Skip to content

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 ADMIN role.

http
POST /api/workspaces
Content-Type: application/json

Request Body

FieldTypeRequiredDescription
keystringUnique machine-readable key (e.g. acme). Used in workspace DB names.
namestringHuman-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/workspaces

Get Workspace

Requires ADMIN role or workspace membership.

http
GET /api/workspaces/{workspaceId}

Members

Add Member

Requires ADMIN role or workspace ADMIN role.

http
POST /api/workspaces/{workspaceId}/members
Content-Type: application/json

Request Body

FieldTypeRequiredDescription
userIdstringID of the user to add
rolestringWorkspace 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 ADMIN role or workspace membership.

http
GET /api/workspaces/{workspaceId}/members

Remove Member

Requires ADMIN role or workspace ADMIN role.

http
DELETE /api/workspaces/{workspaceId}/members/{userId}

User Management

Base path: /api/admin/users

All endpoints require ADMIN role.

Create User

http
POST /api/admin/users
Content-Type: application/json

Request Body

FieldTypeRequiredDescription
emailstringUnique email address
fullNamestringDisplay name
passwordstringInitial password
rolesstring[]Platform roles: ADMIN, USER

List Users

http
GET /api/admin/users

Get User

http
GET /api/admin/users/{userId}

Update User

http
PUT /api/admin/users/{userId}
Content-Type: application/json

Delete User

http
DELETE /api/admin/users/{userId}

MetaOne Platform Documentation