---
title: Rename or archive a workspace
description: "Patches the workspace's name, avatar_url (the logo; null clears), and accent_hue (owner or admin) and/or archived_at (owner only — sole-owner..."
api_method: PATCH
api_path: "/v1/workspaces/{workspaceId}"
canonical_url: https://wiblo.app/docs/developers/api/workspaces/update-workspace
last_updated: 2026-08-03T21:24:33+02:00
md_url: https://wiblo.app/docs/developers/api/workspaces/update-workspace.md
---

# Rename or archive a workspace

`PATCH /v1/workspaces/{workspaceId}`

Patches the workspace's `name`, `avatar_url` (the logo; `null` clears), and `accent_hue` (owner or admin) and/or `archived_at` (owner only — sole-owner workspace archive IS allowed; owner-floor only applies to memberships, not to workspace archive itself). Slug is intentionally absent from the request schema; renames are deferred. Per-user rate-limited at 30/60s.

## Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | `string` | Yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | No |  |
| `avatar_url` | `string \| null` | No | Workspace logo URL; `null` clears the logo so the tile falls back to the initial-on-colour rendering. Requires owner or admin, like `name`. |
| `accent_hue` | `"red" \| "coral" \| "orange" \| "green" \| "teal" \| "blue" \| ...` | No | Monogram accent key (one of the ten pickable hues, `red` through `crimson`); `null` clears the pick so the tile returns to the id-hash colour. Requires owner or admin, like `name`. |
| `archived_at` | `string \| null` | No |  |

## Request

**curl**

```bash
curl https://api.wiblo.app/v1/workspaces/{workspaceId} \
  -X PATCH \
  -H "Authorization: Bearer $WIBLO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "...",
  "avatar_url": "...",
  "accent_hue": "red"
}'
```

**TypeScript**

```ts
import { createSdk, updateWorkspace } from "@workspace/sdk"

const sdk = createSdk({ baseUrl: "https://api.wiblo.app" })

const { data, error } = await updateWorkspace({
  client: sdk,
  path: { workspaceId: "..." },
  body: {
    "name": "...",
    "avatar_url": "...",
    "accent_hue": "red"
  },
})
```

## Responses

**`200`** — The updated workspace plus the caller's role. Returns `WorkspaceResponse`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes |  |
| `slug` | `string` | Yes |  |
| `name` | `string` | Yes |  |
| `avatar_url` | `string \| null` | Yes |  |
| `accent_hue` | `"red" \| "coral" \| "orange" \| "green" \| "teal" \| "blue" \| ...` | Yes | Stored accent key; `null` means the tile derives its colour from the id hash. |
| `created_at` | `string` | Yes |  |
| `updated_at` | `string` | Yes |  |
| `archived_at` | `string \| null` | Yes |  |
| `role` | `"owner" \| "admin" \| "member"` | Yes |  |

**`400`** — Body failed Zod validation (`VALIDATION_FAILED`). A slug field, an unknown property, or a whitespace-only `name` all land here because `UpdateWorkspaceRequest` is a strict object. Returns `ApiErrorEnvelope`.

**`401`** — No valid Supabase session cookie was present. Returns `ApiErrorEnvelope`.

**`403`** — Caller's role does not permit the requested change. Setting `name` or `accent_hue` requires owner or admin (`ADMIN_REQUIRED`); setting `archived_at` requires owner (`OWNER_REQUIRED`). Returns `ApiErrorEnvelope`.

**`404`** — Caller has no active membership in the workspace, or the workspace does not exist (`WORKSPACE_NOT_FOUND`). Both cases share the envelope to avoid leaking existence. Returns `ApiErrorEnvelope`.

**`422`** — Path param failed UUID validation (`INVALID_PARAMS`). Returns `ApiErrorEnvelope`.

**`429`** — Rate limit exceeded. The body's `error.code` is `RATE_LIMITED` and `error.details.retry_after` is the same number of seconds as the `Retry-After` header. Returns `ApiErrorEnvelope`.
