Skip to content
Get started

Members

Administer workspaces across the account: create and archive workspaces and manage their membership. These operations are account-scoped and require the admin role (a token whose profile holds the WorkOS admin role); they live under /v1/account/workspaces rather than the workspace-scoped /v1/workspaces tree so an admin can manage any workspace in the account, including ones they are not themselves a member of.

List workspace members
client.WorkspaceAdmin.Members.List(ctx, workspaceID, query) (*CursorPagination[WorkspaceMember], error)
GET/v1/account/workspaces/{workspaceId}/members
Add a member to a workspace
client.WorkspaceAdmin.Members.Add(ctx, workspaceID, body) (*WorkspaceMember, error)
POST/v1/account/workspaces/{workspaceId}/members
Remove a member from a workspace
client.WorkspaceAdmin.Members.Remove(ctx, workspaceID, profileID) error
DELETE/v1/account/workspaces/{workspaceId}/members/{profileId}