---
title: "Take a file off a reply before it is sent"
method: DELETE
path: "/api/v1/mail/threads/{id}/attachments/{attachmentId}"
tags: ["Desk"]
---

# Take a file off a reply before it is sent

`DELETE /api/v1/mail/threads/{id}/attachments/{attachmentId}`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/mail/threads/{id}/attachments/{attachmentId}`
- Auth: API key in cookie `better-auth.session_token`

Deletes the kept bytes of a file taken off a reply before it was sent.

## Path parameters

- `id` string, required
- `attachmentId` string, required

## Query parameters

- `message` string, required

## Response `200`

The file is gone.

- object
  - `ok` unknown, required
  - `data` object, required
    - `id` string, required: Stable record id, e.g. `lse_012`.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `404`: No such conversation on this team.
- `409`: That reply is already on its way, so its files stay with it.

---

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