---
title: "Delete attachments by path (idempotent)"
method: POST
path: "/api/attachments/batch-delete"
tags: ["Attachments"]
---

# Delete attachments by path (idempotent)

`POST /api/attachments/batch-delete`

## Request

- Base URL: `https://api.engram.page`
- URL: `https://api.engram.page/api/attachments/batch-delete`
- Auth: HTTP bearer

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.

## Request body

- AttachmentBatchDeleteRequest
  - `paths` string[], required

## Response `200`

Deleted count

- DeletedCount
  - `deleted` integer, required

## Other responses

- `400`: Missing paths

---

[API](https://skmtc.dev/engram/apis/engram-api.md) · [All operations](https://skmtc.dev/engram/apis/engram-api/llms.txt) · [OpenAPI document](https://skmtc.dev/engram/apis/engram-api/revisions/8c4c2eec29dc?raw)
