import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.inboxes.drafts.send({
inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
draftId: 'c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32',
});
$resend = Resend::client('re_xxxxxxxxx');
$resend->inboxes->drafts->send(
'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
'c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32'
);
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Inboxes.Drafts.send(
inbox_id="b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
draft_id="c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
)
require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
inbox_id: "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
draft_id: "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32"
}
Resend::Inboxes::Drafts.send(params)
package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Inboxes.Drafts.Send(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
nil,
)
use resend_rs::{
types::{SendInboxDraftOptions},
Resend, Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let _sent = resend
.inboxes
.send_draft(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
SendInboxDraftOptions::new(),
)
.await?;
Ok(())
}
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.inboxes.model.SendInboxDraftResponseSuccess;
public class Main {
public static void main(String[] args) throws ResendException {
Resend resend = new Resend("re_xxxxxxxxx");
SendInboxDraftResponseSuccess data = resend.inboxes().drafts().send(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32");
}
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
var resp = await resend.InboxDraftSendAsync(
new Guid( "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1" ),
new Guid( "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32" )
);
Console.WriteLine( "Email Id={0}", resp.Content );
curl -X POST 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/drafts/c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32/send' \
-H 'Authorization: Bearer re_xxxxxxxxx'
resend inboxes drafts send b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32
{
"id": "6a0c8e58-3d9e-4f7a-8b14-2e3f4a5b6c71"
}
Send Draft
Send an existing draft from the inbox address.
POST
/
inboxes
/
:inbox_id
/
drafts
/
:draft_id
/
send
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.inboxes.drafts.send({
inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
draftId: 'c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32',
});
$resend = Resend::client('re_xxxxxxxxx');
$resend->inboxes->drafts->send(
'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
'c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32'
);
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Inboxes.Drafts.send(
inbox_id="b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
draft_id="c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
)
require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
inbox_id: "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
draft_id: "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32"
}
Resend::Inboxes::Drafts.send(params)
package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Inboxes.Drafts.Send(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
nil,
)
use resend_rs::{
types::{SendInboxDraftOptions},
Resend, Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let _sent = resend
.inboxes
.send_draft(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
SendInboxDraftOptions::new(),
)
.await?;
Ok(())
}
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.inboxes.model.SendInboxDraftResponseSuccess;
public class Main {
public static void main(String[] args) throws ResendException {
Resend resend = new Resend("re_xxxxxxxxx");
SendInboxDraftResponseSuccess data = resend.inboxes().drafts().send(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32");
}
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
var resp = await resend.InboxDraftSendAsync(
new Guid( "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1" ),
new Guid( "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32" )
);
Console.WriteLine( "Email Id={0}", resp.Content );
curl -X POST 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/drafts/c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32/send' \
-H 'Authorization: Bearer re_xxxxxxxxx'
resend inboxes drafts send b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32
{
"id": "6a0c8e58-3d9e-4f7a-8b14-2e3f4a5b6c71"
}
Sends the draft from the inbox address.
The draft needs a
to recipient and html or text. A draft that is not a
reply also needs a subject. Otherwise, the request returns a 422. A reply
draft without a subject uses the thread subject with a Re: prefix. The whole
email can be at most 40 MB. A draft that was already sent returns a 409.
Path Parameters
Body Parameters
The request body is optional and takes onlyheaders. Without headers, send no
body.
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.drafts.send({
inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
draftId: 'c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32',
});
$resend = Resend::client('re_xxxxxxxxx');
$resend->inboxes->drafts->send(
'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
'c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32'
);
import resend
resend.api_key = "re_xxxxxxxxx"
resend.Inboxes.Drafts.send(
inbox_id="b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
draft_id="c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
)
require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
inbox_id: "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
draft_id: "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32"
}
Resend::Inboxes::Drafts.send(params)
package main
import "github.com/resend/resend-go/v4"
func main() {
client := resend.NewClient("re_xxxxxxxxx")
client.Inboxes.Drafts.Send(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
nil,
)
use resend_rs::{
types::{SendInboxDraftOptions},
Resend, Result,
};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let _sent = resend
.inboxes
.send_draft(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
SendInboxDraftOptions::new(),
)
.await?;
Ok(())
}
import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.inboxes.model.SendInboxDraftResponseSuccess;
public class Main {
public static void main(String[] args) throws ResendException {
Resend resend = new Resend("re_xxxxxxxxx");
SendInboxDraftResponseSuccess data = resend.inboxes().drafts().send(
"b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1",
"c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32");
}
}
using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" ); // Or from DI
var resp = await resend.InboxDraftSendAsync(
new Guid( "b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1" ),
new Guid( "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32" )
);
Console.WriteLine( "Email Id={0}", resp.Content );
curl -X POST 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/drafts/c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32/send' \
-H 'Authorization: Bearer re_xxxxxxxxx'
resend inboxes drafts send b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32
{
"id": "6a0c8e58-3d9e-4f7a-8b14-2e3f4a5b6c71"
}
Was this page helpful?
⌘I