Send Draft
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',
});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 \
--inbox_id b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 \
--draft_id c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32{
"object": "inbox_draft",
"id": "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
"thread_id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"email_id": "6a0c8e58-3d9e-4f7a-8b14-2e3f4a5b6c71"
}The draft must have at least one recipient. A draft that was already sent returns 409.
Path Parameters
Section titled “Path Parameters”Response Fields
Section titled “Response Fields”string
Always inbox_draft.
string
The ID of the draft.
string
The Thread ID the sent message belongs to.
string
The ID of the queued outbound email.
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',
});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 \
--inbox_id b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 \
--draft_id c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32{
"object": "inbox_draft",
"id": "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
"thread_id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"email_id": "6a0c8e58-3d9e-4f7a-8b14-2e3f4a5b6c71"
}Was this page helpful?
⌘I