Workspace

envless.workspace.update()

Rename the workspace or toggle Virtual Envs

ts
update(patch: WorkspacePatch, options?: RequestScope): Promise<UpdatedWorkspaceResource>

Renames the workspace, changes its slug, or toggles virtual environments. Each field is optional and applied on its own, and an empty patch is accepted and resolves the workspace unchanged.

Only name, slug and virtualEnvsEnabled are read. Any other key in the patch is dropped silently rather than rejected, so a misspelled field looks like a successful no-op. The icon cannot be set through the API at all.

Changing slug rewrites every dashboard URL and every exposed environment URL for the workspace, and the old slug is neither reserved nor redirected, so another workspace can claim it. The resolved UpdatedWorkspaceResource omits createdAt, which envless.workspace.get does return.

Example

ts
const workspace = await envless.workspace.update({
    name: 'Acme Platform',
    virtualEnvsEnabled: true
})

console.log(workspace.slug, workspace.virtualEnvsEnabled)

Parameters

ParameterTypeRequiredDescription
patch.namestringNoNew display name for the workspace.
patch.slugstringNoNew slug, limited to lowercase letters, digits and single hyphens.
patch.virtualEnvsEnabledbooleanNoWorkspace half of the two flag gate on exposed environments.
options.signalAbortSignalNoCancels the request.

Returns

UpdatedWorkspaceResource with id, name, slug, icon and virtualEnvsEnabled.

Worth knowing

  • Setting virtualEnvsEnabled to true exposes nothing by itself. Every environment still needs its own expose opt-in.
  • Setting virtualEnvsEnabled to false is a kill switch: every exposed feed in the workspace stops serving at once.
  • A slug another workspace already owns fails with status 409 and the generic request.conflict code, so read the message for the reason.

Required scopes

workspace:write

Underlying endpoint

PATCH /workspace

Request and response schema, every error code, and a live playground.

In Python

envless.workspace.update()

The same method in envless-sdk, the Python SDK, with the same request, retries and errors.

In Ruby

Envless.workspace.update

The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.

In PHP

$envless->workspace->update()

The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.