import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.inboxes.threads.emails.forward({
inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
threadId: '4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12',
emailId: '5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60',
to: ['colleague@example.org'],
cc: ['billing@example.com'],
bcc: ['records@example.com'],
text: 'Flagging this refund request for you.',
attachments: [
{
path: 'https://resend.com/static/sample/invoice.pdf',
filename: 'invoice.pdf',
},
],
});
$resend = Resend::client('re_xxxxxxxxx');
$resend->inboxes->threads->emails->forward(
'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
'4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12',
'5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60',
[
'to' => ['colleague@example.org'],
'cc' => ['billing@example.com'],
'bcc' => ['records@example.com'],
'text' => 'Flagging this refund request for you.',
'attachments' => [
[
'path' => 'https://resend.com/static/sample/invoice.pdf',
'filename' => 'invoice.pdf',
],
],
]
);
import resend
resend.api_key = "re_xxxxxxxxx"
params: resend.Inboxes.Threads.Emails.ForwardParams = {
"inbox_id": "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"thread_id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"email_id": "5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
"to": ["colleague@example.org"],
"cc": ["billing@example.com"],
"bcc": ["records@example.com"],
"text": "Flagging this refund request for you.",
"attachments": [
{
"path": "https://resend.com/static/sample/invoice.pdf",
"filename": "invoice.pdf",
}
],
}
resend.Inboxes.Threads.Emails.forward(params)
require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
inbox_id: "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
thread_id: "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
email_id: "5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
to: ["colleague@example.org"],
cc: ["billing@example.com"],
bcc: ["records@example.com"],
text: "Flagging this refund request for you.",
attachments: [{ path: "https://resend.com/static/sample/invoice.pdf", filename: "invoice.pdf" }]
}
Resend::Inboxes::Threads::Emails.forward(params)
package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
params := &resend.ForwardInboxThreadEmailRequest{
To: []string{"colleague@example.org"},
Cc: []string{"billing@example.com"},
Bcc: []string{"records@example.com"},
Text: "Flagging this refund request for you.",
Attachments: []*resend.Attachment{
{
Path: "https://resend.com/static/sample/invoice.pdf",
Filename: "invoice.pdf",
},
},
}
client.Inboxes.Threads.Emails.Forward(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
params,
)
use resend_rs::{
types::{CreateAttachment, ForwardInboxThreadEmailOptions},
Resend, Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let opts = ForwardInboxThreadEmailOptions::new(["colleague@example.org"])
.with_cc(["billing@example.com"])
.with_bcc(["records@example.com"])
.with_text("Flagging this refund request for you.")
.with_attachment(
CreateAttachment::from_path("https://resend.com/static/sample/invoice.pdf")
.with_filename("invoice.pdf"),
);
let _forward = resend
.inboxes
.forward_thread_email(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
opts,
)
.await?;
Ok(())
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
var resp = await resend.InboxThreadEmailForwardAsync(
new Guid( "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1" ),
new Guid( "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12" ),
new Guid( "5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60" ),
new InboxThreadEmailForwardData()
{
To = "colleague@example.org",
Cc = "billing@example.com",
Bcc = "records@example.com",
TextBody = "Flagging this refund request for you.",
Attachments =
[
new EmailAttachment()
{
Filename = "invoice.pdf",
Path = "https://resend.com/static/sample/invoice.pdf",
},
],
}
);
Console.WriteLine( "Email Id={0}", resp.Content );
curl -X POST 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/threads/4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12/emails/5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60/forward' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"to": ["colleague@example.org"],
"cc": ["billing@example.com"],
"bcc": ["records@example.com"],
"text": "Flagging this refund request for you.",
"attachments": [
{
"path": "https://resend.com/static/sample/invoice.pdf",
"filename": "invoice.pdf"
}
]
}'
resend inboxes threads emails forward b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12 5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60 \
--to colleague@example.org \
--cc billing@example.com \
--bcc records@example.com \
--text "Flagging this refund request for you." \
--attachment ./invoice.pdf
{
"id": "6a0c8e58-3d9e-4f7a-8b14-2e3f4a5b6c71"
}
Forward Thread Email
Forward a message in an inbox thread to new recipients.
POST
/
inboxes
/
:inbox_id
/
threads
/
:thread_id
/
emails
/
:email_id
/
forward
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.inboxes.threads.emails.forward({
inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
threadId: '4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12',
emailId: '5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60',
to: ['colleague@example.org'],
cc: ['billing@example.com'],
bcc: ['records@example.com'],
text: 'Flagging this refund request for you.',
attachments: [
{
path: 'https://resend.com/static/sample/invoice.pdf',
filename: 'invoice.pdf',
},
],
});
$resend = Resend::client('re_xxxxxxxxx');
$resend->inboxes->threads->emails->forward(
'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
'4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12',
'5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60',
[
'to' => ['colleague@example.org'],
'cc' => ['billing@example.com'],
'bcc' => ['records@example.com'],
'text' => 'Flagging this refund request for you.',
'attachments' => [
[
'path' => 'https://resend.com/static/sample/invoice.pdf',
'filename' => 'invoice.pdf',
],
],
]
);
import resend
resend.api_key = "re_xxxxxxxxx"
params: resend.Inboxes.Threads.Emails.ForwardParams = {
"inbox_id": "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"thread_id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"email_id": "5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
"to": ["colleague@example.org"],
"cc": ["billing@example.com"],
"bcc": ["records@example.com"],
"text": "Flagging this refund request for you.",
"attachments": [
{
"path": "https://resend.com/static/sample/invoice.pdf",
"filename": "invoice.pdf",
}
],
}
resend.Inboxes.Threads.Emails.forward(params)
require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
inbox_id: "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
thread_id: "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
email_id: "5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
to: ["colleague@example.org"],
cc: ["billing@example.com"],
bcc: ["records@example.com"],
text: "Flagging this refund request for you.",
attachments: [{ path: "https://resend.com/static/sample/invoice.pdf", filename: "invoice.pdf" }]
}
Resend::Inboxes::Threads::Emails.forward(params)
package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
params := &resend.ForwardInboxThreadEmailRequest{
To: []string{"colleague@example.org"},
Cc: []string{"billing@example.com"},
Bcc: []string{"records@example.com"},
Text: "Flagging this refund request for you.",
Attachments: []*resend.Attachment{
{
Path: "https://resend.com/static/sample/invoice.pdf",
Filename: "invoice.pdf",
},
},
}
client.Inboxes.Threads.Emails.Forward(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
params,
)
use resend_rs::{
types::{CreateAttachment, ForwardInboxThreadEmailOptions},
Resend, Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let opts = ForwardInboxThreadEmailOptions::new(["colleague@example.org"])
.with_cc(["billing@example.com"])
.with_bcc(["records@example.com"])
.with_text("Flagging this refund request for you.")
.with_attachment(
CreateAttachment::from_path("https://resend.com/static/sample/invoice.pdf")
.with_filename("invoice.pdf"),
);
let _forward = resend
.inboxes
.forward_thread_email(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
opts,
)
.await?;
Ok(())
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
var resp = await resend.InboxThreadEmailForwardAsync(
new Guid( "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1" ),
new Guid( "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12" ),
new Guid( "5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60" ),
new InboxThreadEmailForwardData()
{
To = "colleague@example.org",
Cc = "billing@example.com",
Bcc = "records@example.com",
TextBody = "Flagging this refund request for you.",
Attachments =
[
new EmailAttachment()
{
Filename = "invoice.pdf",
Path = "https://resend.com/static/sample/invoice.pdf",
},
],
}
);
Console.WriteLine( "Email Id={0}", resp.Content );
curl -X POST 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/threads/4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12/emails/5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60/forward' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"to": ["colleague@example.org"],
"cc": ["billing@example.com"],
"bcc": ["records@example.com"],
"text": "Flagging this refund request for you.",
"attachments": [
{
"path": "https://resend.com/static/sample/invoice.pdf",
"filename": "invoice.pdf"
}
]
}'
resend inboxes threads emails forward b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12 5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60 \
--to colleague@example.org \
--cc billing@example.com \
--bcc records@example.com \
--text "Flagging this refund request for you." \
--attachment ./invoice.pdf
{
"id": "6a0c8e58-3d9e-4f7a-8b14-2e3f4a5b6c71"
}
Forwards a message from the inbox address.
The attachments of the original message are sent with the forward, together
with any
attachments you add. The request fails when they exceed 25 MB of
content in total. Files you add with path do not count toward it. An original
attachment that was sent from a URL (path) cannot be forwarded, and the
request returns a 422. The whole email can be at most 40 MB.
The forward carries the same In-Reply-To and References headers as a
reply to the original message, so
mail clients may group it with the original conversation.
Path Parameters
Body Parameters
string | string[]
required
Recipient email address. For multiple addresses, send as an array of strings.
Must name at least one address.
to, cc, and bcc combined cannot exceed
50 recipients.string | string[] | null
CC recipient email address.
string | string[] | null
BCC recipient email address.
string
An HTML note sent above the quoted original.
string
A plain-text note sent above the quoted original.
string
The subject of the forward. 1 to 2000 characters, with no line breaks.
Defaults to the thread subject with a
Fwd: prefix.array | null
Files to attach, as on Send Email.
object | null
Custom headers to add to the email. You cannot set
In-Reply-To,
References, or Reply-To.Headers
string
Add an idempotency key to prevent duplicated emails.
- Should be unique per API request
- Idempotency keys expire after 24 hours
- Have a maximum length of 256 characters
- A retry with the same key returns the first successful response, with the
idempotent-replayed: trueheader - A failed request is not stored, so you can retry it with the same key
- Reusing the key with a different body, or while the first request is still
running, returns a
409
Response Fields
string
The ID of the sent email. Use it with the emails
endpoints.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.inboxes.threads.emails.forward({
inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
threadId: '4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12',
emailId: '5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60',
to: ['colleague@example.org'],
cc: ['billing@example.com'],
bcc: ['records@example.com'],
text: 'Flagging this refund request for you.',
attachments: [
{
path: 'https://resend.com/static/sample/invoice.pdf',
filename: 'invoice.pdf',
},
],
});
$resend = Resend::client('re_xxxxxxxxx');
$resend->inboxes->threads->emails->forward(
'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
'4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12',
'5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60',
[
'to' => ['colleague@example.org'],
'cc' => ['billing@example.com'],
'bcc' => ['records@example.com'],
'text' => 'Flagging this refund request for you.',
'attachments' => [
[
'path' => 'https://resend.com/static/sample/invoice.pdf',
'filename' => 'invoice.pdf',
],
],
]
);
import resend
resend.api_key = "re_xxxxxxxxx"
params: resend.Inboxes.Threads.Emails.ForwardParams = {
"inbox_id": "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"thread_id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"email_id": "5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
"to": ["colleague@example.org"],
"cc": ["billing@example.com"],
"bcc": ["records@example.com"],
"text": "Flagging this refund request for you.",
"attachments": [
{
"path": "https://resend.com/static/sample/invoice.pdf",
"filename": "invoice.pdf",
}
],
}
resend.Inboxes.Threads.Emails.forward(params)
require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
inbox_id: "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
thread_id: "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
email_id: "5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
to: ["colleague@example.org"],
cc: ["billing@example.com"],
bcc: ["records@example.com"],
text: "Flagging this refund request for you.",
attachments: [{ path: "https://resend.com/static/sample/invoice.pdf", filename: "invoice.pdf" }]
}
Resend::Inboxes::Threads::Emails.forward(params)
package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
params := &resend.ForwardInboxThreadEmailRequest{
To: []string{"colleague@example.org"},
Cc: []string{"billing@example.com"},
Bcc: []string{"records@example.com"},
Text: "Flagging this refund request for you.",
Attachments: []*resend.Attachment{
{
Path: "https://resend.com/static/sample/invoice.pdf",
Filename: "invoice.pdf",
},
},
}
client.Inboxes.Threads.Emails.Forward(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
params,
)
use resend_rs::{
types::{CreateAttachment, ForwardInboxThreadEmailOptions},
Resend, Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let opts = ForwardInboxThreadEmailOptions::new(["colleague@example.org"])
.with_cc(["billing@example.com"])
.with_bcc(["records@example.com"])
.with_text("Flagging this refund request for you.")
.with_attachment(
CreateAttachment::from_path("https://resend.com/static/sample/invoice.pdf")
.with_filename("invoice.pdf"),
);
let _forward = resend
.inboxes
.forward_thread_email(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60",
opts,
)
.await?;
Ok(())
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
var resp = await resend.InboxThreadEmailForwardAsync(
new Guid( "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1" ),
new Guid( "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12" ),
new Guid( "5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60" ),
new InboxThreadEmailForwardData()
{
To = "colleague@example.org",
Cc = "billing@example.com",
Bcc = "records@example.com",
TextBody = "Flagging this refund request for you.",
Attachments =
[
new EmailAttachment()
{
Filename = "invoice.pdf",
Path = "https://resend.com/static/sample/invoice.pdf",
},
],
}
);
Console.WriteLine( "Email Id={0}", resp.Content );
curl -X POST 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/threads/4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12/emails/5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60/forward' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"to": ["colleague@example.org"],
"cc": ["billing@example.com"],
"bcc": ["records@example.com"],
"text": "Flagging this refund request for you.",
"attachments": [
{
"path": "https://resend.com/static/sample/invoice.pdf",
"filename": "invoice.pdf"
}
]
}'
resend inboxes threads emails forward b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12 5b1a9f47-2c8d-4e6f-9a03-1d2e3f4a5b60 \
--to colleague@example.org \
--cc billing@example.com \
--bcc records@example.com \
--text "Flagging this refund request for you." \
--attachment ./invoice.pdf
{
"id": "6a0c8e58-3d9e-4f7a-8b14-2e3f4a5b6c71"
}
Was this page helpful?
⌘I