FlaresendDocs
Emails

Cancel an email

Cancel a scheduled email before it is sent.

DELETE/v1/emails/{id}API key

Stops a scheduled email from going out. Its status and every recipient's status become canceled, an email.canceled event is added to the timeline, and webhooks subscribed to email.canceled are called.

Only emails with status scheduled can be canceled. Emails sent without scheduledAt go to the queue straight away and can't be stopped. If the send queue picks up a scheduled email at the same moment you cancel it, whichever gets there first wins: the cancel either succeeds, or fails with 409 not_cancelable and the email is sent.

The email record is kept. Nothing is deleted.

Path parameters

idstringpathrequired

The email ID.

Response

idstring

The email ID.

status'canceled'

Always canceled.

Errors

StatusCodeWhen
404email_not_foundNo email with that ID in this project.
409not_cancelableThe email isn't scheduled, or the send queue claimed it first.