Cancel email
Cancels an email that is still scheduled, so it is never sent.
opensend.emails.cancel(id)opensend emails cancelInput
id goes first, on its own, and the rest in one object. One object that holds id works too.
idstringRequiredThe id of the item. Up to 64 characters.
Returns
The call resolves to the answer, already parsed. A call the API refuses throws OpenSendError with the code and the message of the answer. SDK lists the errors of the client itself.
object"email"Always
email.idstringThe id of the email.
fromstringThe sender.
tostring[]Who the email is for.
subjectstringThe subject line.
statusstringWhere the email is:
scheduled,queued,sent,delivered,delayed,bounced,complained,failedorcanceled, andopenedorclickedonce the recipient acts.One of
queuedsentdelivereddelayedbouncedopenedclickedcomplainedfailedscheduledcanceledmodestringlivefor a real email.testfor 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 of
livetestdomainstringThe domain it was sent from.
ccstring[]Who got a copy.
bccstring[]Who got a copy without the others seeing.
replyTostring | nullThe address replies go to, or
null.scheduledAtstring | nullWhen it is due to be sent, or
nullfor an email sent at once.createdAtstringWhen the API accepted the email.
htmlstring | nullThe message as HTML, or
null.textstring | nullThe 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[].filenamestringThe name of the file.
attachments[].contentTypestring | nullThe media type of the file, or
nullwhen none was given.attachments[].sizeinteger | nullThe size of the file in bytes, or
nullwhen it was given by address.templateIdstring | nullThe id of the template it was built from, or
null.automationobject | nullThe automation run that sent it, or
nullfor an email you sent yourself.automation.idstringThe id of the automation.
automation.runIdstringThe id of the run.
automation.stepIdstringThe id of the step that sent it.
eventsobject[]What has happened to the email, oldest first.
events[].typestringWhat happened: the status the email moved to.
One of
queuedsentdelivereddelayedbouncedopenedclickedcomplainedfailedscheduledcanceledevents[].atstringWhen it happened.
events[].detailstringMore about it, such as the reason for a bounce. Often empty.