The official SDK is tinysend on npm (currently 0.5.0) — a typed client covering the full API. Zero dependencies, fetch-based, works in Node.js, Bun, Deno, Cloudflare Workers, and browsers.
npm install tinysend
import { Tinysend } from 'tinysend';
const ts = new Tinysend('sk_...');
const list = await ts.lists.create({ name: 'Weekly Update' });
await ts.subscribers.create(list.id, {
email: 'user@example.com',
verified: true,
tags: ['from:web'],
metadata: { plan: 'pro' },
org: 'Acme',
job_title: 'Engineer',
});
const post = await ts.posts.create(list.id, {
subject: 'Hello World',
body_html: '<p>Welcome!</p>',
});
await ts.posts.send(list.id, post.id);
Resources
ts.lists— create, update, delete newsletters; waitlistjoinandinvitets.subscribers— add (withtags,metadata,org,job_titlewritten onto the contact), update, import, exportts.posts— create, update, send broadcaststs.contacts— your audience across newsletters, with tags, metadata, activity, and delivery historyts.mailboxes— inbound mailboxes and their emailsts.sender— who emails come from: tinysend default or your own domaints.siteDomains— custom domain for your archive sitets.webhooks— manage webhooks, inspect deliveriests.automations,ts.invites,ts.stats,ts.usage,ts.settings
Every method maps 1:1 to the REST API — the SDK is verified against the live openapi spec on every release, so it never drifts.
Errors
import { TinysendError } from 'tinysend';
try {
await ts.lists.get('nonexistent');
} catch (err) {
if (err instanceof TinysendError) {
console.log(err.status, err.code, err.message); // 404 'not_found' 'list not found'
}
}
Source and issues: github.com/tiny-send/tinysend-node. Sending from CI instead? Use the GitHub action.
Questions?
Contact us at hi@tinysend.com.