NewWacht Bench is live — AI-assisted development for Wacht

updateWorkspace()

Updates workspace fields using multipart form fields, including optional metadata updates and image upload/removal.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function updateWorkspace(workspaceId: string) {  const client = await wachtClient();  return client.workspaces.updateWorkspace(workspaceId, {    description: 'Updated workspace description',    remove_image: true,  });}

Signature

function updateWorkspace(  workspaceId: string,  request: UpdateWorkspaceRequest,): Promise<Workspace>

Parameters

workspaceId?: string | undefined;
Stable workspace id.
request.name?: string | undefined;
Optional new workspace name.
request.description?: string | undefined;
Optional new workspace description.
request.public_metadata?: Record<string, unknown> | undefined;
Optional public metadata patch.
plan?: string | undefined;
Example public plan field.
owner?: string | undefined;
Example public owner field.
request.private_metadata?: Record<string, unknown> | undefined;
Optional private metadata patch.
internal_notes?: string | undefined;
Example internal note field.
billing_id?: string | undefined;
Example internal billing identifier.
request.remove_image?: boolean | undefined;
Remove existing workspace image when true.
request.workspace_image?: File | Blob | undefined;
Optional new workspace image upload.

Behavior

  • Updates mutable workspace fields by id.
  • Multipart payload supports metadata updates and image replacement/removal.

On this page