Delete folders by id (idempotent)
POST
/folders/batch-delete
const url = 'https://api.engram.page/folders/batch-delete';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"ids":["9f1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d","1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"]}'};
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/folders/batch-delete \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "ids": [ "9f1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d", "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d" ] }'Deletes multiple folders by marker id in a single transaction and returns the deleted count. Requires the X-Idempotency-Key header — a retry within the TTL replays the cached result. Returns 404/409 (with the offending item_id) if any id is missing or conflicts.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Folder ids
Media typeapplication/json
BatchIdsRequest
object
ids
required
Array<string>
Example
{ "ids": [ "9f1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d", "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d" ]}Responses
Section titled “Responses”Deleted count
Media typeapplication/json
DeletedCount
object
deleted
required
integer
Example
{ "deleted": 3}Invalid ids
Some ids not found
Conflict