Delete Thread
DELETE
/
inboxes
/
:inbox_id
/
threads
/
:thread_id
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 -X DELETE 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/threads/4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12' \
-H 'Authorization: Bearer re_xxxxxxxxx'resend inboxes threads delete \
--inbox_id b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 \
--thread_id 4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12 \
--yes{
"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.
Path Parameters
Section titled “Path Parameters”Response Fields
Section titled “Response Fields”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.
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 -X DELETE 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/threads/4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12' \
-H 'Authorization: Bearer re_xxxxxxxxx'resend inboxes threads delete \
--inbox_id b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 \
--thread_id 4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12 \
--yes{
"object": "inbox_thread",
"id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"deleted": true
}Was this page helpful?
⌘I