Cancel an email
Cancels an email that is `scheduled` or `queued`. It is refunded and fires `email.canceled`.
Cancels an email that is scheduled or queued. It is refunded and
fires email.canceled.
apiKeyAuthorizationBearer <token>Authorization: Bearer chy_live_… (or chy_test_…). A live key may
be sending-only, and may be locked to one domain.
id*string^em_Canceled.
application/json- response
id*stringstatus*EmailStatussent = our delivery infrastructure accepted it; delivered = the
receiving server did. unknown = no delivery event 30 minutes after
an uncertain send (never re-sent; the charge stays).
With several recipients the status sums them up: complained if
any recipient complained, else bounced if any bounced, else
delivered once EVERY recipient was delivered, else
delivery_delayed if any is delayed, else sent. Each recipient's
own events are in events, with recipient.
"scheduled""queued""sending""sent""delivered""delivery_delayed""bounced""complained""canceled""expired""suppressed""failed""unknown"import { CharchySend } from "@charchy/send"const send = new CharchySend() // reads CHARCHY_SEND_KEYconst { data, error } = await send.emails.cancel("em_8f2k1x9q4w7m3n5p6r0s2t4v"){ "id": "em_5k2m8x1q9w3r3n5p6r0s2t4v", "status": "canceled"}