TypeScript SDK that makes the email API simple
Create inboxes, fetch messages and wait for new mail from a fully typed TypeScript client.
Automated testing, CI pipelines, SaaS onboarding flows and chatbot integrations all share a common need: programmatic access to disposable email. The dissolve.email TypeScript SDK gives you a clean, fully typed API client that handles authentication, retries and real-time subscriptions out of the box.
Three lines to your first inbox
Install with a single command, initialize with your API key and start creating inboxes. Every method returns strongly typed responses, so your editor catches mistakes before they reach production. The SDK covers the full API surface: inbox management, message retrieval, attachment downloads, webhook management and more.
npm install @dissolve-email/sdk
import { Dissolve } from "@dissolve-email/sdk";
const client = new Dissolve({ apiKey: process.env.DISSOLVE_API_KEY });
const inbox = await client.inboxes.create();
const messages = await client.inboxes.listMessages(inbox.id);
Wait for mail without polling
For workflows that need the next email as soon as it lands, agent identities support long polling. One call waits until the message arrives or the timeout passes, so there are no polling loops and no wasted API calls.
const identity = await client.agent.create({ persona: true });
const result = await client.agent.verify(identity.id, { timeout: 30 });
Small and portable
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. Read the full reference in the docs.
Why it helps
Fully type-safe
Every request and response is typed with TypeScript interfaces. Catch errors at compile time.
Long polling built in
Wait for the next email or verification code in a single call. No polling loops required.
Easy installation
Install from npm with a single command. No external dependencies, works in any modern runtime.
Full API coverage
Inboxes, messages, attachments, webhooks, inbox rules, teams and agent identities in one SDK.
Questions
How do I install the SDK?
Run `npm install @dissolve-email/sdk` (or use pnpm, yarn or bun). Then `import { Dissolve } from "@dissolve-email/sdk"`, pass your API key and start making calls. Full setup instructions are in the docs.
What languages and runtimes are supported?
The SDK is written in TypeScript and works in any JavaScript runtime that supports the Fetch API, including Node.js 18 and later, Deno, Bun and Cloudflare Workers. For other languages, use the REST API at https://api.dissolve.email.
Are there rate limits?
Yes. Pro allows 100 API requests per minute and Business allows 1,000. The SDK handles 429 responses automatically with exponential backoff.
Can the SDK wait for new email?
Yes. Agent identities support long polling: `client.agent.waitForMessage()` and `client.agent.verify()` block until the email or code arrives, up to 30 seconds on Pro and 120 seconds on Business.
Can the SDK generate fictional personas for form filling?
Yes. Pass `persona: true` to `client.agent.create()` to generate a fictional persona with name, address, phone, date of birth and username. You can also set `country` (17 supported countries) and `gender`. Personas are for testing and automation only and need a Pro or Business plan.
Related features
Agent API
Pro and upDisposable email and password pairs for AI agents and browser automation, with verification codes extracted for you.
Learn moreTeam workspaces
BusinessShare disposable inboxes with your team, with live presence indicators and read receipts in real time.
Learn moreDisposable email
Every planCreate temporary inboxes that auto-expire after a set duration. Receive emails instantly with no signup required.
Learn moreStart building today
Install the SDK, grab an API key and create your first inbox in minutes.