Charchy Senddocs

List emails

Your workspace's emails of the last 30 days, newest first, with cursor pagination. Needs a key with full permission.

GET
/emails

Your workspace's emails of the last 30 days, newest first, with cursor pagination. 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.

limit?integer

Page size, 1–100.

Range1 <= value <= 100
Default20
after?string

The next_cursor of the previous page.

status?string

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"
tag?string

A tag as key:value, e.g. type:order_confirmation.

to?string

A recipient address.

Formatemail

Response Body

A page of emails.

application/json
  1. response
data*array<>
has_more*boolean
next_cursor?string

Pass as after for the next page.

Example Request
import { CharchySend } from "@charchy/send"const send = new CharchySend() // reads CHARCHY_SEND_KEYconst { data, error } = await send.emails.list()
Example Response
{  "data": [    {      "id": "string",      "status": "scheduled",      "from": "string",      "to": [        "string"      ],      "subject": "string",      "tags": {        "type": "order_confirmation"      },      "test": true,      "created_at": "2019-08-24T14:15:22Z",      "scheduled_at": "2019-08-24T14:15:22Z"    }  ],  "has_more": true,  "next_cursor": "string"}