Workspaces
A workspace is the unit of isolation in Harmony. Skills, agents, sessions, API keys, and credentials all hang off a workspace. A user can belong to many workspaces; each workspace has at least one owner.
GET /api/me
Returns the authenticated user and the workspaces they belong to.
curl https://platform.groupany.ai/api/me
Response 200:
{
"user": {
"id": "cm…",
"email": "[email protected]",
"name": "Bart",
"image": "https://…"
},
"workspaces": [
{
"id": "cm…",
"slug": "bart-personal",
"name": "Bart's workspace",
"role": "owner",
"memberCount": 1,
"apiKeyCount": 0,
"createdAt": "2026-05-28T19:02:11.000Z"
}
]
}
GET /api/workspaces
Same shape as me.workspaces, without the user envelope.
POST /api/workspaces
Create a new workspace. The caller becomes its first member with role owner.
curl -X POST https://platform.groupany.ai/api/workspaces \
-H "Content-Type: application/json" \
-d '{ "name": "Acme research", "slug": "acme-research" }'
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | 1–80 chars. Display name. |
slug | string | no | 2–40 chars, [a-z0-9-]. Auto-derived from name when omitted. |
Response 201:
{
"workspace": {
"id": "cm…",
"slug": "acme-research",
"name": "Acme research",
"role": "owner"
}
}
Errors:
| Status | Code | When |
|---|---|---|
400 | validation_failed | Bad slug or empty name |
409 | slug_taken | Another workspace already owns that slug |
GET /api/workspaces/{slug}
Returns the workspace plus its members. Membership required.
Response 200:
{
"workspace": {
"id": "cm…",
"slug": "acme-research",
"name": "Acme research",
"apiKeyCount": 0,
"createdAt": "2026-05-28T19:02:11.000Z",
"members": [
{
"userId": "cm…",
"role": "owner",
"joinedAt": "2026-05-28T19:02:11.000Z",
"user": {
"id": "cm…",
"name": "Bart",
"email": "[email protected]",
"image": null
}
}
]
}
}
PATCH /api/workspaces/{slug}
Rename a workspace. Requires owner or admin role.
curl -X PATCH https://platform.groupany.ai/api/workspaces/acme-research \
-H "Content-Type: application/json" \
-d '{ "name": "Acme R&D" }'
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | no | 1–80 chars |
The slug cannot be changed via PATCH — slug rename is a destructive operation that breaks integrations. Issue a follow-up endpoint when needed.
DELETE /api/workspaces/{slug}
Permanently delete a workspace and everything in it (members, API keys, sessions). Owner only.
Response: 204 No Content.
Errors:
| Status | Code | When |
|---|---|---|
404 | not_found_or_forbidden | Workspace doesn't exist, or you're not the owner |