Documentation

Send your first email

Authenticate with a Bearer API key and POST to /v1/emails. That's the whole quickstart.

npminstall @saalr-io/yours-truly
quickstart.ts
import { YoursTruly } from "@saalr-io/yours-truly";
 
const yt = new YoursTruly(process.env.YT_API_KEY);
 
async function main() {
const { id } = await yt.emails.send({
from: "hello@yourdomain.com", // a domain you've verified
to: ["ada@example.com"],
subject: "Email that lands",
html: "<strong>Yours, truly.</strong>",
});
console.log("Sent", id); // → Sent email_yrwky6q…
}
 
main();

Run it

  1. Change from to an address on a domain you've verified. Any other domain is rejected with domain_not_verified.
  2. Put your API key in YT_API_KEY and run the file:
    mac / linuxYT_API_KEY=yt_live_… npx tsx quickstart.ts
    windows$env:YT_API_KEY="yt_live_…"; npx tsx quickstart.ts
  3. You'll see Sent email_…, and the email appears in your dashboard with its delivery timeline.

API reference

Base URL https://api.yourstrulymail.com

POST/v1/emails
GET/v1/emails/:id
GET/v1/emails/:id/events
POST/v1/domains
POST/v1/domains/:id/verify
POST/v1/api-keys
GET/v1/broadcasts
POST/v1/webhooks
GET/v1/analytics/overview
GET/v1/logs
Get an API key