---
title: "Move attachments to a folder (idempotent)"
method: POST
path: "/api/attachments/batch-move"
tags: ["Attachments"]
---

# Move attachments to a folder (idempotent)

`POST /api/attachments/batch-move`

## Request

- Base URL: `https://api.engram.page`
- URL: `https://api.engram.page/api/attachments/batch-move`
- Auth: HTTP bearer

Moves multiple attachments (by path) into `target_folder` and returns the moved count. Requires a plan with attachments enabled (402 otherwise) and the `X-Idempotency-Key` header. Returns 404/409 (with the offending `item_path`) if an item is missing or conflicts at the target.

## Request body

- AttachmentBatchMoveRequest
  - `paths` string[], required
  - `target_folder` string, required

## Response `200`

Moved count

- MovedCount
  - `moved` integer, required

## Other responses

- `400`: Missing params
- `402`: Attachments require a paid plan
- `404`: An item was not found
- `409`: An item conflicts at target
- `422`: Target path cleans to nothing

---

[API](https://skmtc.dev/engram/apis/engram-api.md) · [All operations](https://skmtc.dev/engram/apis/engram-api/llms.txt) · [OpenAPI document](https://skmtc.dev/engram/apis/engram-api/revisions/8c4c2eec29dc?raw)
