@send0/sdk
v0.1.0
Published
Official TypeScript SDK for send0 — API-first messaging infrastructure
Maintainers
Readme
@send0/sdk
Official TypeScript SDK for the send0 messaging API.
Installation
npm install @send0/sdkQuick Start
import { Send0 } from "@send0/sdk";
const send0 = new Send0("sk_live_...");
await send0.emails.send({
from: "[email protected]",
to: "[email protected]",
subject: "Welcome",
html: "<p>Hello!</p>",
});Email Templates (JSX)
Build type-safe email templates with the built-in component system:
/** @jsxImportSource @send0/sdk */
import { Template, Text, Button } from "@send0/sdk/components";
export default function Welcome({ name }: { name: string }) {
return (
<Template preview={`Welcome, ${name}!`}>
<Text heading>Hey {name}</Text>
<Text>Thanks for signing up!</Text>
<Button href="https://example.com" primary>
Get Started
</Button>
</Template>
);
}CLI
npx @send0/sdk init # Scaffold template project
npx @send0/sdk dev # Local dev server with inbox UI
npx @send0/sdk preview # Live template preview
npx @send0/sdk push # Push templates to cloud
npx @send0/sdk validate # Validate templatesWebhook Verification
import { Send0 } from "@send0/sdk";
const event = Send0.webhooks.verify(rawBody, headers, webhookSecret);Resources
License
MIT
