Move notes to a folder (idempotent)
POST
/notes/batch-move
const url = 'https://api.engram.page/notes/batch-move';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"ids":["9f1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d","1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"],"target_folder_id":"7c8d9e0f-1a2b-3c4d-5e6f-7a8b9c0d1e2f"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.engram.page/notes/batch-move \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "ids": [ "9f1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d", "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d" ], "target_folder_id": "7c8d9e0f-1a2b-3c4d-5e6f-7a8b9c0d1e2f" }'Moves multiple notes into the folder identified by target_folder_id (or the literal "root" for the vault root) in one transaction and returns the moved count. Requires the X-Idempotency-Key header. Returns 404/409 (with item_id) if any id is missing or conflicts.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Ids + target folder
Media typeapplication/json
BatchMoveNotesRequest
object
ids
required
Array<string>
target_folder
Destination folder path (alternative to target_folder_id; “” = vault root). Use this to move into a derived folder that has no marker.
string
target_folder_id
Folder UUID or “root”.
string
Example
{ "ids": [ "9f1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d", "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d" ], "target_folder_id": "7c8d9e0f-1a2b-3c4d-5e6f-7a8b9c0d1e2f"}Responses
Section titled “Responses”Moved count
Media typeapplication/json
MovedCount
object
moved
required
integer
Example
{ "moved": 3}Invalid input
Some ids not found
Conflict