---
title: "Delete a message"
description: "One message, moved to the bin of the mailbox that runs the pool."
url: "https://nextmail.sh/docs/api/temp-mail/message-delete"
area: "API"
category: "Disposable inboxes"
---

# Delete a message

One message, moved to the bin of the mailbox that runs the pool.

`DELETE /temp-mail/inboxes/{id}/messages/{messageId}`

## DELETE /temp-mail/inboxes/{id}/messages/{messageId}

One message, moved to the bin of the mailbox that runs the pool.

## The inbox token

**shell**

```
export OE=https://api.nextmail.sh
export INBOX="Authorization: Bearer oe_inbox_kQ8v…"
```

Every call below carries the token `POST /temp-mail/inboxes` returned, in the same `Authorization: Bearer` header an API key uses. The address itself authorises nothing, and that separation is the point of the feature rather than a formality: a disposable address is handed to the party you are keeping at arm’s length the moment it is issued.

> The token alone decides which inbox a call reads. The id in the path is not checked against it, so a caller juggling two inboxes has to keep each token with its own id.

## Example

The message moves to the bin with its attachments, no lease lists it again, and `messageCount` goes down by one.

**curl**

```
curl -X DELETE "$OE/temp-mail/inboxes/tinb_octopus-signup/messages/thr_4b81c07d2fa9418e93c6a13f" \
  -H "$INBOX"
```

**Response**

```
{ "object": "temp_message", "id": "thr_4b81c07d2fa9418e93c6a13f", "deleted": true }
```

> Nothing on this API restores it: it sits in the bin of the mailbox that runs the pool, which only Nextmail can open.

> Deleting is never needed to make room. An inbox has no ceiling on what it keeps, and the list pages through all of it.

## Reference

- [`DELETE /temp-mail/inboxes/{id}/messages/{messageId}`](https://nextmail.sh/docs/api/reference/temp-mail#delete-temp-mail-inboxes-id-messages-messageid): full reference
