Skip to main content
Resend Docs
current

Search documentation

Type to search this documentation.

On this pageOverview

Delete Thread

Move a thread to the trash folder.

Deleting a thread moves it to trash and schedules it for deletion in 30 days.

The Inbox ID.

The Thread ID.

  • object (string) — Always inbox_thread.

  • id (string) — The ID of the thread.

  • deleted (boolean) — True when this call moved the thread to trash, false when the thread was already there.

Node.js
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.inboxes.threads.remove({
  inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
  threadId: '4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12',
});
cURL
curl -X DELETE 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/threads/4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12' \
     -H 'Authorization: Bearer re_xxxxxxxxx'
CLI
resend inboxes threads delete \
  --inbox_id b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 \
  --thread_id 4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12 \
  --yes
Response
{
  "object": "inbox_thread",
  "id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
  "deleted": true
}
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu