api.workspaces manages workspaces, api.workspaces.members their members and api.workspaces.apps the shared apps.
Creating workspaces needs a Standard, Pro or Enterprise plan.
Examples use the api client from Creating the client. workspaceId is the id of a workspace (workspaces.list() lists them), appId the id of one of your apps and memberId the id of a member.
Workspaces
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(). The code is valid for 5 minutes.
group): view, manager, maintain and admin. 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 api.apps method. workspaces.get() and workspaces.list() return raw ids, so build it yourself:
Errors
Exceptworkspaces.get(), workspace routes send the ids in the request body, so an empty id there is 400 INVALID_ID from the server, not a local error.
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.

