Cancel Email
Cancel a scheduled email before it is sent. Only emails with a queued or scheduled status can be canceled.
POST
/emails/{email_id}/cancelResend Compatibility: Compatible
Path Parameters
email_idstringrequiredThe ID of the email to cancel.
Response Fields
objectstringAlways "email".
idstringThe email ID.
curl -X POST 'https://api.postflare.app/emails/49a3999c-0ce1-4ea6-ab68-afcd6dc2e794/cancel' \
-H 'Authorization: Bearer re_xxxxxxxxx'import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.emails.cancel(
'49a3999c-0ce1-4ea6-ab68-afcd6dc2e794'
);Response
{
"object": "email",
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}