Skip to content
Get started

Workspace Admin

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 all workspaces in the account
client.workspaceAdmin.list(WorkspaceAdminListParams { cursor, includeArchived, limit } query?, RequestOptionsoptions?): CursorPagination<Workspace { metadata, spec, status } >
GET/v1/account/workspaces
Create a workspace
client.workspaceAdmin.create(WorkspaceAdminCreateParams { metadata, spec } body, RequestOptionsoptions?): Workspace { metadata, spec, status }
POST/v1/account/workspaces
Get a workspace by ID
client.workspaceAdmin.retrieve(stringworkspaceID, RequestOptionsoptions?): Workspace { metadata, spec, status }
GET/v1/account/workspaces/{workspaceId}
Update a workspace
client.workspaceAdmin.update(stringworkspaceID, WorkspaceAdminUpdateParams { metadata, spec, updateMask } body, RequestOptionsoptions?): Workspace { metadata, spec, status }
PATCH/v1/account/workspaces/{workspaceId}
Archive a workspace
client.workspaceAdmin.archive(stringworkspaceID, RequestOptionsoptions?): void
DELETE/v1/account/workspaces/{workspaceId}
ModelsExpand Collapse
WorkspaceMember { actorId, profileId, addedAt, 2 more }

A member of a workspace: the profile granted access plus the actor row that links it to the workspace. Returned by member list/add operations.

actorId: string

The actor row linking the profile to the workspace (the junction record).

profileId: string

The account profile that has access to the workspace.

addedAt?: string

When the member was added to the workspace.

formatdate-time
email?: string

Email address of the member’s profile.

name?: string

Display name of the member’s profile.

Workspace AdminMembers

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(stringworkspaceID, MemberListParams { cursor, limit } query?, RequestOptionsoptions?): CursorPagination<WorkspaceMember { actorId, profileId, addedAt, 2 more } >
GET/v1/account/workspaces/{workspaceId}/members
Add a member to a workspace
client.workspaceAdmin.members.add(stringworkspaceID, MemberAddParams { email, profileId } body, RequestOptionsoptions?): WorkspaceMember { actorId, profileId, addedAt, 2 more }
POST/v1/account/workspaces/{workspaceId}/members
Remove a member from a workspace
client.workspaceAdmin.members.remove(stringprofileID, MemberRemoveParams { workspaceId } params, RequestOptionsoptions?): void
DELETE/v1/account/workspaces/{workspaceId}/members/{profileId}

Workspace AdminProfiles

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.

Search account profiles
client.workspaceAdmin.profiles.list(ProfileListParams { cursor, limit, query } query?, RequestOptionsoptions?): CursorPagination<Profile { metadata, spec } >
GET/v1/account/profiles