agenticemail
v0.2.0
Published
TypeScript SDK for AgenticEmail — API-first email for AI agents.
Readme
agenticemail (TypeScript)
API-first email for AI agents.
npm install agenticemailimport { AgenticEmail, verifyWebhook } from "agenticemail";
const client = new AgenticEmail({ apiKey: process.env.AGENTICEMAIL_API_KEY!, baseUrl: "https://api.agenticemail.dev" });
const inbox = await client.inboxes.create({ username: "support", domain: "acme.io" });
await client.messages.send(inbox.id, {
to: ["[email protected]"],
subject: "Hello",
text: "Sent from an agent.",
});
const threads = await client.threads.list(inbox.id);Resources: inboxes, messages, threads, drafts, webhooks, domains, apiKeys. Methods are camelCase; requests and responses are converted between camelCase and the API's snake_case automatically. Errors throw AgenticEmailError (.status, .code).
Verifying webhooks:
import { verifyWebhook } from "agenticemail";
const event = verifyWebhook(rawBody, req.headers, process.env.WEBHOOK_SECRET!); // throws AgenticEmailError if invalid
if (event.type === "message.received") { /* ... */ }Related
- CLI: the same API as JSON-first shell commands —
npm install -g agenticemail-cli, includingwait-for-messagefor agent loops - Python SDK:
pip install agenticemail - Docs: guides, CLI, MCP server, and the interactive API reference
