# `album.move`

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

**Move a photo into a folder**

Moves the image into the folder and re-renders it for the folder's crop rules. Returns the updated image.

## Parameters

Passed by name in the `params` object.

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Image UUID to move |
| `album_id` | string | yes | Destination folder UUID |

## Result

Returns `ImageDTO`:

| Field | Type | Description |
|---|---|---|
| `album_id` | string |  |
| `created_at *` | string |  |
| `custom_crops *` | `array<customCropDTO>` |  |
| `description *` | string |  |
| `exif *` | `exifDTO` |  |
| `exif_visibility` | `visibilityDTO` |  |
| `format *` | string |  |
| `height *` | integer |  |
| `id *` | string |  |
| `renders *` | `array<renderDTO>` |  |
| `size_bytes *` | integer |  |
| `status *` | string |  |
| `title *` | string |  |
| `width *` | integer |  |

## Errors

| Code | Message | When |
|---|---|---|
| `2001` | `not_found` | No such resource owned by the caller. |

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

## Example

Request:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "album.move",
  "params": {
    "id": "018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d",
    "album_id": "018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50"
  }
}
```

Response:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "id": "018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d",
    "title": "Golden Gate at dawn",
    "description": "Long exposure from the Marin Headlands.",
    "status": "ready",
    "width": 6000,
    "height": 4000,
    "size_bytes": 8452016,
    "format": "jpg",
    "exif": {
      "taken_at": "2026-02-11T06:42:18Z",
      "camera_make": "FUJIFILM",
      "camera_model": "X-T5",
      "lens": "XF16-55mmF2.8"
    },
    "renders": [
      {
        "crop": "thumb",
        "format": "webp",
        "width": 256,
        "height": 256,
        "size_bytes": 14320,
        "url": "https://img.peinture.gumeniuk.com/r/018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d/thumb.webp?v=3",
        "pending": false
      },
      {
        "crop": "large",
        "format": "webp",
        "width": 2048,
        "height": 1365,
        "size_bytes": 412880,
        "url": "https://img.peinture.gumeniuk.com/r/018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d/large.webp?v=3",
        "pending": false
      }
    ],
    "custom_crops": [],
    "exif_visibility": {
      "gps": false,
      "camera": true,
      "datetime": true,
      "settings": false
    },
    "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.move","params":{"id":"018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d","album_id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50"}}'
```

**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.move", params: {"id":"018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d","album_id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50"},
  }),
});
const { result, error } = await res.json();
```

**Go**

```go
body := []byte(`{"jsonrpc":"2.0","id":1,"method":"album.move","params":{"id":"018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d","album_id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50"}}`)
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)
```

