Cancel a scheduled email
const url = 'https://api.connect.ms/v2/email/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.connect.ms/v2/email/example \ --header 'Authorization: Bearer <token>'Stops a scheduled email that is still waiting to send. An email with no scheduledAt in the future, or one already sent or in a final state, cannot be cancelled.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The id of the email.
Header Parameters
Section titled “Header Parameters”The API version to use, for example 2026-10-01. Defaults to the version set on your API key.
Responses
Section titled “Responses”The email, now cancelled.
An email. The same shape is returned by every email endpoint and carried by email.* events.
object
The unique id of the email.
The kind of email: transactional (service messages, the default), marketing (promotional, subject to marketing opt-outs) or authentication (one-time codes).
The address the email was sent from.
The address the email was sent to. Null when the caller may not see recipients.
The subject line. Null when the caller may not see content.
What is kept of the body after sending.
object
The HTML body. Not kept after sending, so always null.
A plain-text excerpt of the body, up to 2000 characters, taken from the text body or extracted from the HTML.
The email status: queued (accepted or scheduled, not yet handed over for delivery), sent (handed over, awaiting the outcome), delivered (accepted by the recipient’s mail server), failed (see reason) or cancelled.
Why an email failed or did not reach the inbox.
object
Why an email failed or did not reach the inbox: hard_bounce (the address does not exist or refuses mail), soft_bounce (a temporary problem at the recipient’s server; the email may still arrive), complaint (the recipient reported it as spam), suppressed (the address is on the suppression list), rejected (refused before sending) or failed (any other failure).
The specific error code in snake_case, e.g. hard_bounce or spam_complaint.
Details of the problem, such as what the recipient’s mail server said, or null when nothing useful was recorded.
True when sending the email again later may succeed.
Your own reference for this email, as supplied when it was sent.
The grouping tag for usage reporting, as stored when the email was sent (lower case, letters, digits and hyphens).
How many times the email’s tracking image has been loaded. Stays 0 unless trackOpens was set.
When (UTC) the email was created.
When (UTC) the email was asked to send, or null when no send time was given. Sending limits can delay an email beyond this time.
When (UTC) the email was handed over for delivery, or null if not yet recorded. Can still be null in the send response moments after handover.
When (UTC) the recipient’s mail server accepted the email, or null if not delivered.
When (UTC) the email was first opened, or null if never.
When (UTC) the email last changed.
Example
{ "kind": "transactional", "status": "queued", "reason": { "category": "hard_bounce" }}The request is not valid. The detail field says why, and errors lists any problems by field name.
Why a request failed, in the RFC 9457 problem details format.
object
A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.
A short, fixed summary of the kind of problem.
The HTTP status code of the response.
What went wrong with this particular request, when there is more to say than the title.
For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).
object
The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": { "additionalProperty": [ "example" ] }, "requestId": "example"}The API key or bearer token is missing or not valid, or the request signature could not be verified.
Why a request failed, in the RFC 9457 problem details format.
object
A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.
A short, fixed summary of the kind of problem.
The HTTP status code of the response.
What went wrong with this particular request, when there is more to say than the title.
For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).
object
The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": { "additionalProperty": [ "example" ] }, "requestId": "example"}The caller is not allowed to do this.
Why a request failed, in the RFC 9457 problem details format.
object
A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.
A short, fixed summary of the kind of problem.
The HTTP status code of the response.
What went wrong with this particular request, when there is more to say than the title.
For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).
object
The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": { "additionalProperty": [ "example" ] }, "requestId": "example"}No email with that id.
Why a request failed, in the RFC 9457 problem details format.
object
A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.
A short, fixed summary of the kind of problem.
The HTTP status code of the response.
What went wrong with this particular request, when there is more to say than the title.
For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).
object
The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": { "additionalProperty": [ "example" ] }, "requestId": "example"}The email is not a scheduled email still waiting to send, so it cannot be cancelled.
Why a request failed, in the RFC 9457 problem details format.
object
A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.
A short, fixed summary of the kind of problem.
The HTTP status code of the response.
What went wrong with this particular request, when there is more to say than the title.
For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).
object
The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": { "additionalProperty": [ "example" ] }, "requestId": "example"}The service is temporarily unavailable. Retry after the Retry-After header.
Why a request failed, in the RFC 9457 problem details format.
object
A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.
A short, fixed summary of the kind of problem.
The HTTP status code of the response.
What went wrong with this particular request, when there is more to say than the title.
For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).
object
The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": { "additionalProperty": [ "example" ] }, "requestId": "example"}