Workspaces
Create and manage workspaces and their members.
Workspaces
Workspaces are the top-level billing and membership boundary. Every other resource belongs to a workspace.
Endpoints
POST /v1/workspaces
Create a workspace. The caller becomes the owner.
Body
Response 201: workspace object
GET /v1/workspaces
List all workspaces the current user belongs to.
Response 200: array of workspace objects
GET /v1/workspaces/:id
Get a single workspace. Requires membership.
Response 200: workspace object
PATCH /v1/workspaces/:id
Update workspace name or slug. Requires admin+.
Body: any subset of { name, slug }
Response 200: updated workspace
DELETE /v1/workspaces/:id
Delete a workspace and all its contents. Requires owner.
Response 204
Members
GET /v1/workspaces/:id/members
List all workspace members with their roles.
Response 200
PATCH /v1/workspaces/:id/members/:userId
Change a member's role. Requires admin+. Cannot demote an owner.
Body { "role": "editor" }
Response 200
DELETE /v1/workspaces/:id/members/:userId
Remove a member. Requires admin+.
Response 204
Invites
POST /v1/workspaces/:id/invites
Invite a user by email. Requires admin+.
Body
Response 201: invite object with token
GET /v1/workspaces/:id/invites
List pending invites. Requires admin+.
Response 200: array of invite objects
DELETE /v1/workspaces/:id/invites/:inviteId
Revoke an invite. Requires admin+.
Response 204
Workspace Object
Roles
| Role | Capabilities |
|---|---|
viewer | Read-only access to all resources |
editor | Create / update / delete workflows, spaces |
admin | Manage members, invites, API keys |
owner | Full control including workspace deletion |