Charchy Senddocs

Get an email

An email's status, recipients, tags, timestamps and event timeline. Kept for 30 days. Needs a key with full permission.

GET
/emails/{id}

An email's status, recipients, tags, timestamps and event timeline. Kept for 30 days. Needs a key with full permission.

apiKey
headerAuthorizationBearer <token>

Authorization: Bearer chy_live_… (or chy_test_…). A live key may be sending-only, and may be locked to one domain.

id*string
Match^em_

Response Body

The email.

application/json
  1. response
id*string
status*EmailStatus

sent = 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.

Value in"scheduled""queued""sending""sent""delivered""delivery_delayed""bounced""complained""canceled""expired""suppressed""failed""unknown"
from*string
to*array<string>
cc*array<string>
bcc*array<string>
reply_to*array<string>
subject*string
tags*

Up to 10 pairs; keys and values use letters, digits, _ and -, up to 256 characters.

Propertiesproperties <= 10
test*boolean

Sent with a test key.

created_at*string
Formatdate-time
scheduled_at*|
Formatdate-time
expires_at*|
Formatdate-time
events*array<>
Example Request
import { CharchySend } from "@charchy/send"const send = new CharchySend() // reads CHARCHY_SEND_KEYconst { data, error } = await send.emails.get("em_8f2k1x9q4w7m3n5p6r0s2t4v")
Example Response
{  "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    }  ]}