---
title: "Delete a context_attachment"
method: DELETE
path: "/documents/{document_id}/context-attachments/{attachment_id}"
tags: ["context-attachments"]
---

# Delete a context_attachment

`DELETE /documents/{document_id}/context-attachments/{attachment_id}`

Deletes the attachment item and, if it has an associated S3 blob, the blob too. Idempotent at the HTTP layer: a delete on a non-existent attachment returns 404 with a stable error code so the integrator can choose to treat it as success.

**Snapshot semantics:** if extraction is in flight against this attachment, the in-memory snapshot in the worker is unaffected — the in-flight job completes against the pinned payload, and the resulting facts carry the now-dead attachment_id in `Fact.context_attachment_ids_used`.

## Path parameters

- `document_id` string, uuid, required
- `attachment_id` string, uuid, required

## Response `204`

Attachment deleted

## Other responses

- `404` — Attachment not found
- `422` — Validation Error

---

[API](https://skmtc.dev/scipot/apis/scipot-core-api.md) · [All operations](https://skmtc.dev/scipot/apis/scipot-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scipot/scipot-core-api/revisions/e8712e9ffeae/schema)
