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',
});
$resend = Resend::client('re_xxxxxxxxx');
$resend->inboxes->threads->remove(
'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
'4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12'
);
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Inboxes.Threads.remove(
inbox_id="b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
thread_id="4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
)
require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
inbox_id: "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
thread_id: "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12"
}
Resend::Inboxes::Threads.remove(params)
package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Inboxes.Threads.Remove(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
)
use resend_rs::{Resend, Result};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let _deleted = resend
.inboxes
.delete_thread(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
)
.await?;
Ok(())
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
await resend.InboxThreadDeleteAsync(
new Guid( "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1" ),
new Guid( "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 b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12 \
--yes
{
"object": "inbox_thread",
"id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"deleted": true
}
Delete Thread
Move a thread to the trash folder.
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',
});
$resend = Resend::client('re_xxxxxxxxx');
$resend->inboxes->threads->remove(
'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
'4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12'
);
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Inboxes.Threads.remove(
inbox_id="b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
thread_id="4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
)
require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
inbox_id: "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
thread_id: "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12"
}
Resend::Inboxes::Threads.remove(params)
package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Inboxes.Threads.Remove(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
)
use resend_rs::{Resend, Result};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let _deleted = resend
.inboxes
.delete_thread(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
)
.await?;
Ok(())
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
await resend.InboxThreadDeleteAsync(
new Guid( "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1" ),
new Guid( "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 b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 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.
This is reversible. To restore a thread, update
it back to
inbox, archive, or
spam, which also clears the deletion deadline.Path Parameters
Response Fields
string
Always
inbox_thread.string
The ID of the thread.
boolean
Returns
true when the thread is moved to trash, and 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',
});
$resend = Resend::client('re_xxxxxxxxx');
$resend->inboxes->threads->remove(
'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
'4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12'
);
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Inboxes.Threads.remove(
inbox_id="b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
thread_id="4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
)
require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
inbox_id: "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
thread_id: "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12"
}
Resend::Inboxes::Threads.remove(params)
package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Inboxes.Threads.Remove(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
)
use resend_rs::{Resend, Result};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let _deleted = resend
.inboxes
.delete_thread(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
)
.await?;
Ok(())
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
await resend.InboxThreadDeleteAsync(
new Guid( "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1" ),
new Guid( "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 b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12 \
--yes
{
"object": "inbox_thread",
"id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"deleted": true
}
Was this page helpful?
⌘I