Endpoints
Workspaces
API reference for creating and managing workspaces and workspace members.
Overview
Workspaces are isolated environments within a tenant that contain one AI agent, its documents, workflows, integrations, and memory tables. The Workspaces API lets you manage workspace lifecycle and membership.
Create Workspace
POST /workspaces — Create a new workspace. Body: { name: string, description?: string }. Requires TENANT_ADMIN or TENANT_OWNER role. Returns the created workspace with its generated ID and default settings.
List Workspaces
GET /workspaces — Retrieve all workspaces the current user has access to. Each workspace includes name, description, member count, and creation date. Tenant admins see all workspaces; regular users see only workspaces they belong to.
Update Workspace
PUT /workspaces/{id} — Update workspace name, description, or settings. Requires workspace Owner or Admin role.
Workspace Members
GET /workspaces/{id}/members — List all members and their roles. POST /workspaces/{id}/members — Invite a user (by email or user ID). PATCH /workspaces/{id}/members/{userId}/role — Update a member's workspace role (owner, admin, member, viewer). DELETE /workspaces/{id}/members/{memberId} — Remove a member from the workspace.
Delete Workspace
DELETE /workspaces/{id} — Permanently delete a workspace and all its contents (chatbot, documents, workflows, memory tables). This action is irreversible. Requires workspace Owner role.