# `album.update`

<span class="badge">bearer</span>

**Rename/re-describe a folder**

Partial update: omitted fields are left unchanged. The default folder is immutable.

## Parameters

Passed by name in the `params` object.

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Folder UUID |
| `name` | string | no | New name; omit to leave unchanged |
| `description` | string | no | New description; omit to leave unchanged |

## Result

Returns `albumDTO`:

| Field | Type | Description |
|---|---|---|
| `created_at *` | string |  |
| `description *` | string |  |
| `id *` | string |  |
| `image_count *` | integer |  |
| `is_default *` | boolean |  |
| `name *` | string |  |
| `visibility *` | string |  |

## Errors

| Code | Message | When |
|---|---|---|
| `2001` | `not_found` | No such resource owned by the caller. |
| `1003` | `forbidden` | Not the owner, or outside a token's scope. |

See the [error reference](/docs/errors) for the full catalog, including the authentication codes.

## Example

Request:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "album.update",
  "params": {
    "id": "018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50",
    "name": "Iceland — spring 2024"
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "id": "018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50",
    "name": "Iceland 2024",
    "description": "Ring road, March.",
    "is_default": false,
    "visibility": "private",
    "image_count": 42,
    "created_at": "2026-02-11T07:03:00Z"
  }
}
```

**curl**

```bash
curl -s https://peinture.gumeniuk.com/rpc \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"album.update","params":{"id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50","name":"Iceland — spring 2024"}}'
```

**JavaScript**

```js
const res = await fetch("https://peinture.gumeniuk.com/rpc", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${token}`,
  },
  body: JSON.stringify({
    jsonrpc: "2.0", id: 1, method: "album.update", params: {"id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50","name":"Iceland — spring 2024"},
  }),
});
const { result, error } = await res.json();
```

**Go**

```go
body := []byte(`{"jsonrpc":"2.0","id":1,"method":"album.update","params":{"id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50","name":"Iceland — spring 2024"}}`)
req, _ := http.NewRequest("POST", "https://peinture.gumeniuk.com/rpc", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
```

