Delete Draft
DELETE
/
inboxes
/
:inbox_id
/
drafts
/
:draft_id
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.inboxes.drafts.remove({
inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
draftId: 'c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32',
});curl -X DELETE 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/drafts/c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32' \
-H 'Authorization: Bearer re_xxxxxxxxx'resend inboxes drafts delete \
--inbox_id b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 \
--draft_id c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32 \
--yes{
"object": "inbox_draft",
"id": "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
"deleted": true
}Path Parameters
Section titled “Path Parameters”import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.inboxes.drafts.remove({
inboxId: 'b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1',
draftId: 'c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32',
});curl -X DELETE 'https://api.resend.com/inboxes/b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1/drafts/c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32' \
-H 'Authorization: Bearer re_xxxxxxxxx'resend inboxes drafts delete \
--inbox_id b3e2b2b6-3f0e-4c8e-9ad3-2f43a1e2c7f1 \
--draft_id c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32 \
--yes{
"object": "inbox_draft",
"id": "c3a1e8b4-2d5f-4a7c-9e10-6b8d7f5a4c32",
"deleted": true
}Was this page helpful?
⌘I