Skip to content

Delete folders by id (idempotent)

POST
/folders/batch-delete
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.

Folder ids

Media typeapplication/json
BatchIdsRequest
object
ids
required
Array<string>
Example
{
"ids": [
"9f1b2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
]
}

Deleted count

Media typeapplication/json
DeletedCount
object
deleted
required
integer
Example
{
"deleted": 3
}

Invalid ids

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