Skip to content

Move notes to a folder (idempotent)

POST
/notes/batch-move
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.

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"
}

Moved count

Media typeapplication/json
MovedCount
object
moved
required
integer
Example
{
"moved": 3
}

Invalid input

Media typeapplication/json
Error
object
errors
One of:
string
Examplegenerated
{
"errors": {}
}

Some ids not found

Media typeapplication/json
Error
object
errors
One of:
string
Examplegenerated
{
"errors": {}
}

Conflict

Media typeapplication/json
Error
object
errors
One of:
string
Examplegenerated
{
"errors": {}
}