Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

On this pageOverview

Delete Thread

DELETE

/

inboxes

/

:inbox_id

/

threads

/

:thread_id

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
}

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

string

Always inbox_thread.

string

The ID of the thread.

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
JSON
{
  "object": "inbox_thread",
  "id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
  "deleted": true
}

Was this page helpful?

⌘I

Suggest an edit

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

Export
Documentation menu