Cancel a scheduled email
const url = 'https://api.vaartix.com/emails/em_7hq2kv9xr4m1c8d3/cancel';const options = {method: 'POST', 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 POST \ --url https://api.vaartix.com/emails/em_7hq2kv9xr4m1c8d3/cancel \ --header 'Authorization: Bearer <token>'Cancels an email that is still scheduled. Its recipients are given back to today’s
daily limit. Emails that are already being sent cannot be canceled.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
em_7hq2kv9xr4m1c8d3Responses
Section titled “Responses”The canceled email.
object
See the status guide for what each one means.
object
Attachment details (the content is not kept after sending).
object
Size in bytes.
Why the email failed, if it did.
Example
{ "status": "queued", "tags": [ { "name": "category", "value": "receipt" } ]}unauthorized: the API key is missing, invalid or revoked.
object
object
Stable, machine-readable error type.
Human-readable explanation, safe to show to developers.
Example
{ "error": { "type": "validation_error" }}forbidden: the key cannot do this, for example a send-only key on a management endpoint.
object
object
Stable, machine-readable error type.
Human-readable explanation, safe to show to developers.
Example
{ "error": { "type": "validation_error" }}not_found: no such resource in your team.
object
object
Stable, machine-readable error type.
Human-readable explanation, safe to show to developers.
Example
{ "error": { "type": "validation_error" }}conflict: only scheduled emails can be canceled.
object
object
Stable, machine-readable error type.
Human-readable explanation, safe to show to developers.
Example
{ "error": { "type": "validation_error" }}