c.Workspaces manages workspaces, c.Workspaces.Members their members and c.Workspaces.Apps the shared apps.
Creating workspaces needs a Standard, Pro or Enterprise plan.
Each snippet below runs on its own inside this program: paste one at a time into main and run goimports (see Running the examples).
Workspaces
Workspaces.List(ctx) returns every workspace you own or belong to, with the same fields:
The owner cannot leave (400
CANNOT_LEAVE_OWNER): delete the workspace instead.
Members
Adding a member takes an invite code that the member generates withMembers.InviteCode(ctx). The code is valid for 5 minutes.
ID from Workspaces.Get:
WorkspaceGroup): GroupView (view), GroupManager (manager), GroupMaintain (maintain) and GroupAdmin (admin). A member’s Group is a plain string, since it can also be "owner". Calling a method that your role does not allow is 403 PERMISSION_DENIED.
Shared applications
APPLICATIONS_LIMIT_REACHED).
Acting on a shared app
To act on an app shared with you, pass the composite id<appId>-<workspaceId> to any c.Apps method. Workspaces.Get and Workspaces.List return raw ids, so build it yourself:
Errors
Workspace routes other thanGet send the ids in the request body, so an empty id there is 400 INVALID_ID from the server (not a local error). Get sends the id in the path, so an empty id fails locally with INVALID_ID (status 0).
Next steps
AI
Chat completions through the AI Gateway.
Workspace API reference
The REST endpoints behind these methods.
Workspaces from the CLI
The same actions from the terminal.

