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"
}
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',
});
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"
}
Inboxes are currently in private beta and only available to a limited
number of users. The response shape might change before GA. Get in
touch if you’re interested in testing this
feature.Once you have access, upgrade your Resend SDK to use the methods on this
page:
npm install resend@6.28.1-preview-inboxes.1
npm install -g resend-cli@2.22.0-preview-inboxes.1
409.
Path Parameters
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