chronoskin docs
Search the docs Ctrl K Dashboard
Documentation / v2

Send e-mail from your code

chronoskin is one HTTP endpoint for transactional e-mail. These pages take you from an API key to a delivered message.

POST /v2/emails202 in 84 ms
curl api.chronoskin.dev/v2/emails \
  -H "Authorization: Bearer $KEY" \
  -d from="hello@harbour.dev" \
  -d to="ada@example.org" \
  -d subject="Your receipt"

{ "id": "em_41f9c2", "status": "queued" }

Install a library

all at version 2.4
  • Node.jsnpm install chronoskin
  • Pythonpip install chronoskin
  • Gogo get chronoskin.dev/go/v2
  • Rubygem install chronoskin

Recently updated

March 2025
  • Templates New

    Variables, partials and a preview endpoint.

    12 Mar 2025
  • Send e-mail

    The scheduled_at parameter accepts a time zone.

    4 Mar 2025
  • Bounces and complaints

    A table of the codes each large provider returns.

    26 Feb 2025
No key yet?Make one in the console and send a test. Open the console
  1. Docs
  2. Guides
  3. Send an e-mail

Send an e-mail

From an API key to a message in an inbox, in about five minutes.

send.jsCopy
import { Chronoskin } from "chronoskin";

const mail = new Chronoskin(process.env.CHRONOSKIN_KEY);

const { id } = await mail.emails.send({
  from: "Harbour <hello@harbour.dev>",
  to: ["ada@example.org"],
  subject: "Your receipt",
  html: "<p>Thanks for your order.</p>",
});  // em_41f9c2

Before you send

You need an API key and a sender address on a domain you have verified.

Until a domain is verified you can only send to your own address. That is enough to try everything on this page.

What the call returns

  • An id you can use to look the message up later
  • The status queued, which becomes delivered or bounced
  • Nothing else: delivery itself is reported by webhook

Sending to several people

Pass up to 50 addresses in to. Each recipient gets a separate message and never sees the others.

Keys are shown once. Store the key in an environment variable, never in the repository.

403 domain_not_verified. The sender address is on a domain without valid DNS records.

  1. Docs
  2. API reference
  3. Send e-mail

Send e-mail POST

Queues one message for each recipient and returns its id.

Body parameters

application/json
NameTypeNeededMax
fromstringrequired320
tostring[]required50
subjectstringrequired998
htmlstringoptional5,000,000
scheduled_atdatetimeoptional30
tagsobject[]beta10
Max is characters, entries, or days ahead for scheduled_at.

Labels used in this reference

v2 GET POST beta required optional

A parameter marked beta may change its name or type without a new API version.

RequestCopy
POST /v2/emails
Authorization: Bearer ck_live_...

{
  "from": "hello@harbour.dev",
  "to": ["ada@example.org"],
  "subject": "Your receipt",
  "html": "<p>Thanks.</p>"
}
Response, 20284 ms
{
  "id": "em_41f9c2",
  "status": "queued"
}

Responses

  • 202 Queuedthe id is returned
  • 429 Too many requestsretry after 1 s
  • 403 Domain not verifiedcheck DNS
  • 422 Invalid parametersee the message
  1. Docs
  2. API console

API console

Send a real request with a test key and read what comes back.

Test keys never deliver. Messages are accepted, logged and dropped.

Request

POST /v2/emails
Copy as cURL Revoke key

Response

waiting

No requests yet

Fill in the form and send. The status, headers and body appear here.

Follow the quickstart

Your keys

New key
  • ck_live_...a7c1used 2 minutes ago
  • ck_test_...9d2never used