---
title: Update or archive a resource
description: Patches name/category/capacity.
api_method: PATCH
api_path: "/v1/resources/{resourceId}"
canonical_url: https://wiblo.app/docs/developers/api/resources/update-resource
last_updated: 2026-07-28T18:08:25+02:00
md_url: https://wiblo.app/docs/developers/api/resources/update-resource.md
---

# Update or archive a resource

`PATCH /v1/resources/{resourceId}`

Patches name/category/capacity. `archived: true` stamps `archived_at` (soft retirement — the resource leaves listings but keeps history); `archived: false` restores it. Owner/admin only. Per-user rate-limited at 60/60s.

## Path parameters

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

## Headers

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Wiblo-Workspace` | `string` | Yes | Workspace id the call is scoped to. The actor must hold an active membership in it; a foreign or unknown id collapses onto 404 WORKSPACE_NOT_FOUND. |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | No | Display name of the resource. |
| `category` | `string \| null` | No | Free-form pool label that category requirements draw from; `null` for an uncategorised resource. |
| `capacity` | `integer` | No | Concurrent bookings this one resource can hold at any instant — capacity `N` lets `N` bookings overlap on the same resource. |
| `archived` | `boolean` | No | `true` archives the resource (stamps `archived_at`; it leaves listings but stays reachable by id), `false` restores it. |

## Request

**curl**

```bash
curl https://api.wiblo.app/v1/resources/e2f8b4d6-9c1a-4e7b-8f3d-6a2c9e5b1f7d \
  -X PATCH \
  -H "Authorization: Bearer $WIBLO_TOKEN" \
  -H "X-Wiblo-Workspace: $WIBLO_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "archived": true
}'
```

**TypeScript**

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

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

const { data, error } = await updateResource({
  client: sdk,
  path: { resourceId: "e2f8b4d6-9c1a-4e7b-8f3d-6a2c9e5b1f7d" },
  headers: { "X-Wiblo-Workspace": "..." },
  body: {
    "archived": true
  },
})
```

## Example response

```json
{
  "id": "e2f8b4d6-9c1a-4e7b-8f3d-6a2c9e5b1f7d",
  "workspace_id": "9c1b7e24-6a3f-4d58-b2e9-0f4a8c6d1e37",
  "name": "Portable lighting kit",
  "category": "equipment",
  "capacity": 2,
  "archived_at": "2026-07-28T09:30:00.000Z",
  "created_at": "2026-07-28T09:12:00.000Z",
  "updated_at": "2026-07-28T09:30:00.000Z"
}
```

## Responses

**`200`** — The updated resource. Returns `ResourceResponse`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | Unique id of the resource. |
| `workspace_id` | `string` | Yes | Workspace the resource belongs to. |
| `name` | `string` | Yes | Display name of the resource. |
| `category` | `string \| null` | Yes | Pool label that category requirements draw from; `null` for an uncategorised resource. |
| `capacity` | `integer` | Yes | Concurrent bookings this one resource can hold at any instant — capacity `N` lets `N` bookings overlap on the same resource. |
| `archived_at` | `string \| null` | Yes | When the resource was archived; `null` for active resources. |
| `created_at` | `string` | Yes | Creation timestamp (RFC 3339). |
| `updated_at` | `string` | Yes | Last-update timestamp (RFC 3339). |

**`400`** — Body failed Zod validation (`VALIDATION_FAILED`). Returns `ApiErrorEnvelope`.

**`401`** — No valid session cookie or `wbl_*` bearer was present. Returns `ApiErrorEnvelope`.

**`403`** — The actor is a plain member; owner or admin is required (`ADMIN_REQUIRED`). Returns `ApiErrorEnvelope`.

**`404`** — No resource visible to the actor with this id in this workspace (`RESOURCE_NOT_FOUND`), or the workspace itself collapsed (`WORKSPACE_NOT_FOUND`). 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`.
