Skip to the documentation
API

Destroy an inbox

Moves the mail the inbox shows to the bin now. The lease runs on.

DELETE/temp-mail/inboxes/{id}

Runs the real call on your workspace.

DELETE /temp-mail/inboxes/{id}

Moves the mail the inbox shows to the bin now. The lease runs on.

The inbox token

shell
export OE=https://api.nextmail.shexport 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

Every message the lease can see goes to the bin of the mailbox that runs the pool. The token keeps working until its expiry, and mail that arrives after this is listed as usual.

curl
curl -X DELETE "$OE/temp-mail/inboxes/tinb_octopus-signup" -H "$INBOX"
Response
{ "object": "temp_inbox", "id": "tinb_octopus-signup", "destroyed": true }

Nothing is stored server side. The lease is a signed token the caller holds, so there is nothing to revoke, and nothing holds the address back: anybody can be issued it again at once.

While the mailbox that runs the pool cannot be read, this answers 503 not_configured.

Reference