Automated testing, CI pipelines, SaaS onboarding flows, and chatbot integrations all share a common need: programmatic access to disposable email. The destroy.network TypeScript SDK gives you a clean, fully typed API client that handles authentication, retries, and real-time subscriptions out of the box.
Install with a single command, initialize with your API key, and start creating inboxes in three lines of code. Every method returns strongly typed responses so your editor catches mistakes before they reach production. The SDK covers the full API surface: inbox CRUD, message retrieval, attachment downloads, webhook management, and more.
For workflows that need instant email delivery, the SDK includes a built-in real-time subscription system. Open an SSE connection and receive messages the moment they hit the inbox. No polling loops, no wasted API calls.
client.messages.subscribe(inboxId, msg => console.log(msg))
The package is tree-shakeable and ships with zero dependencies beyond the standard Fetch API, keeping your bundle lean. It works in Node.js, Deno, Bun, Cloudflare Workers, and any runtime that supports the Web Fetch standard.