npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@send0/sdk

v0.2.1

Published

Official TypeScript SDK for send0: email inboxes for AI agents

Readme

@send0/sdk

The official TypeScript SDK for send0: email inboxes for AI agents.

Works in Node 18+, Bun, Deno, Cloudflare Workers and browsers. No dependencies.

npm install @send0/sdk

Give an agent an inbox and read the verification code

import { Send0 } from "@send0/sdk";

const send0 = new Send0(process.env.SEND0_API_KEY);

const inbox = await send0.inboxes.create({ name: "signup-agent" });
// → [email protected]

await browser.fill("#email", inbox.address);
await browser.click("Create account");

// Blocks until the email lands (up to 60s here), then returns it with the code already extracted.
const msg = await send0.inboxes.wait(inbox.id, { from: "*@github.com", timeout: 60 });
console.log(msg?.extracted?.otp); // "482913"
console.log(msg?.extracted?.action_link); // "https://github.com/verify?..."

Reply in the same thread

const reply = await send0.messages.reply(msg.id, { text: "Thanks, confirmed." });

Replies carry the right In-Reply-To and References, so they thread in Gmail and Outlook. For inboxes with send_policy: "approval", sends return a draft instead. Check with isDraft(result).

Read and search

for await (const m of await send0.messages.list(inbox.id, { q: "invoice", from: "*@acme.com" })) {
  console.log(m.subject, m.extracted_text); // reply text without quoted history
}

const thread = await send0.threads.get(inbox.id, msg.thread_id); // messages oldest first
const { download_url } = await send0.messages.attachment(msg.id, msg.attachments[0].id);

Lists return a Page. Iterate it with for await to walk every page automatically.

Real-time events

for await (const event of send0.events.stream({ inboxId: inbox.id })) {
  if (event.type === "message.received") console.log(event.data.subject);
}

The stream reconnects on its own and resumes from the last event it saw.

Webhooks

const hook = await send0.webhooks.create({
  url: "https://example.com/hooks/send0",
  events: ["message.received"],
});
// Store hook.secret. It's only shown once.

// In your handler, with the raw request body:
import { verifyWebhook } from "@send0/sdk";
const ok = await verifyWebhook(
  rawBody,
  req.headers.get("send0-signature"),
  process.env.SEND0_WEBHOOK_SECRET!,
);

Errors, retries and idempotency

Failed requests throw Send0Error with status, code (e.g. recipient_not_allowed, daily_limit_reached), message and requestId.

Network errors, 429 and 5xx are retried twice with backoff by default (maxRetries). Every POST carries an Idempotency-Key, so a retried send never goes out twice.

const send0 = new Send0({ apiKey, maxRetries: 3, timeout: 30_000 });

Test keys

s0_test_… keys go through every check but never send real mail. Use them in CI.

License

MIT