Skip to the page

Cancel email

Cancels an email that is still scheduled, so it is never sent.

emails_cancel
Needs the scopeemails:send
Destroys something

Arguments

  • idstringRequired

    The id of the item. Up to 64 characters.

Returns

The answer comes back under structuredContent, with the same JSON as text in content. A call the API refuses comes back with isError set, and the code and the message under structuredContent.error. MCP shows how to connect a client.

  • object"email"

    Always email.

  • idstring

    The id of the email.

  • fromstring

    The sender.

  • tostring[]

    Who the email is for.

  • subjectstring

    The subject line.

  • statusstring

    Where the email is: scheduled, queued, sent, delivered, delayed, bounced, complained, failed or canceled, and opened or clicked once the recipient acts.

    One ofqueuedsentdelivereddelayedbouncedopenedclickedcomplainedfailedscheduledcanceled

  • modestring

    live for a real email. test for an email of the sandbox: it was sent with a test key or to test addresses, nothing left the service and what happened to it is simulated.

    One oflivetest

  • domainstring

    The domain it was sent from.

  • ccstring[]

    Who got a copy.

  • bccstring[]

    Who got a copy without the others seeing.

  • replyTostring | null

    The address replies go to, or null.

  • scheduledAtstring | null

    When it is due to be sent, or null for an email sent at once.

  • createdAtstring

    When the API accepted the email.

  • htmlstring | null

    The message as HTML, or null.

  • textstring | null

    The message as plain text, or null.

  • headersRecord<string, string>

    The extra headers you sent, by name.

  • tagsRecord<string, string>

    The tags you sent, by name.

  • attachmentsobject[]

    The files that were attached. Their content is not kept.

  • attachments[].filenamestring

    The name of the file.

  • attachments[].contentTypestring | null

    The media type of the file, or null when none was given.

  • attachments[].sizeinteger | null

    The size of the file in bytes, or null when it was given by address.

  • templateIdstring | null

    The id of the template it was built from, or null.

  • automationobject | null

    The automation run that sent it, or null for an email you sent yourself.

  • automation.idstring

    The id of the automation.

  • automation.runIdstring

    The id of the run.

  • automation.stepIdstring

    The id of the step that sent it.

  • eventsobject[]

    What has happened to the email, oldest first.

  • events[].typestring

    What happened: the status the email moved to.

    One ofqueuedsentdelivereddelayedbouncedopenedclickedcomplainedfailedscheduledcanceled

  • events[].atstring

    When it happened.

  • events[].detailstring

    More about it, such as the reason for a bounce. Often empty.