Skip to content

Delete attachments by path (idempotent)

POST
/attachments/batch-delete
curl --request POST \
--url https://api.engram.page/attachments/batch-delete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "paths": [ "assets/diagram.png", "assets/old-logo.svg" ] }'

Deletes multiple attachments by path and returns the deleted count. Deliberately not billing-gated so a downgraded user can always clean up. Requires the X-Idempotency-Key header for safe retries.

Paths

Media typeapplication/json
AttachmentBatchDeleteRequest
object
paths
required
Array<string>
Example
{
"paths": [
"assets/diagram.png",
"assets/old-logo.svg"
]
}

Deleted count

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

Missing paths

Media typeapplication/json
MessageError
object
error
required
string
Example
{
"error": "not found"
}