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
workspace_admin.list(**kwargs) -> CursorPagination<Workspace { metadata, spec, status } >
GET/v1/account/workspaces
Create a workspace
workspace_admin.create(**kwargs) -> Workspace { metadata, spec, status }
POST/v1/account/workspaces
Get a workspace by ID
workspace_admin.retrieve(workspace_id) -> Workspace { metadata, spec, status }
GET/v1/account/workspaces/{workspaceId}
Update a workspace
workspace_admin.update(workspace_id, **kwargs) -> Workspace { metadata, spec, status }
PATCH/v1/account/workspaces/{workspaceId}
Archive a workspace
workspace_admin.archive(workspace_id) -> void
DELETE/v1/account/workspaces/{workspaceId}
ModelsExpand Collapse
class WorkspaceMember { actor_id, profile_id, added_at, 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.

actor_id: String

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

profile_id: String

The account profile that has access to the workspace.

added_at: Time

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
workspace_admin.members.list(workspace_id, **kwargs) -> CursorPagination<WorkspaceMember { actor_id, profile_id, added_at, 2 more } >
GET/v1/account/workspaces/{workspaceId}/members
Add a member to a workspace
workspace_admin.members.add(workspace_id, **kwargs) -> WorkspaceMember { actor_id, profile_id, added_at, 2 more }
POST/v1/account/workspaces/{workspaceId}/members
Remove a member from a workspace
workspace_admin.members.remove(profile_id, **kwargs) -> 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
workspace_admin.profiles.list(**kwargs) -> CursorPagination<Profile { metadata, spec } >
GET/v1/account/profiles