Get an email
An email's status, recipients, tags, timestamps and event timeline. Kept for 30 days. Needs a key with full permission.
An email's status, recipients, tags, timestamps and event timeline. Kept for 30 days. Needs a key with full permission.
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_The email.
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"from*stringto*array<string>cc*array<string>bcc*array<string>reply_to*array<string>subject*stringtags*Up to 10 pairs; keys and values use letters, digits, _ and -, up to 256 characters.
properties <= 10test*booleanSent with a test key.
created_at*stringdate-timescheduled_at*|date-timeexpires_at*|date-timeevents*array<>import { CharchySend } from "@charchy/send"const send = new CharchySend() // reads CHARCHY_SEND_KEYconst { data, error } = await send.emails.get("em_8f2k1x9q4w7m3n5p6r0s2t4v"){ "id": "string", "status": "scheduled", "from": "string", "to": [ "string" ], "cc": [ "string" ], "bcc": [ "string" ], "reply_to": [ "string" ], "subject": "string", "tags": { "type": "order_confirmation" }, "test": true, "created_at": "2019-08-24T14:15:22Z", "scheduled_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "events": [ { "type": "scheduled", "at": "2019-08-24T14:15:22Z", "recipient": "user@example.com", "bounce": { "type": "permanent", "sub_type": "general", "message": "The recipient's mail server refused the email: the address does not exist.", "diagnostic_code": "smtp; 550 5.1.1 user unknown" }, "reason": "expires_at", "message": "string", "simulated": true } ]}