Every product, in the language you already use.
coss.com SDKs and tools cover every language you ship in. A zero-dependency TypeScript SDK, six generated SDKs, framework drivers, a CLI and OpenAPI 3.1.
How it works
One client covers every product. Methods return results instead of throwing, and retries are safe by default.
const = new (); // reads COSS_API_KEY
// Email, SMS and every other product on the same client.
const { , } = await ..({
: "Acme <hello@acme.com>",
: "ada@example.com",
: "Your receipt",
: "Thanks for your order.",
});
if () .(., ., .);
// The one function that throws: a failed signature check must not be ignorable.
const = await (
await .(),
.,
..!,
);Checking error narrows data, so TypeScript knows which one you have. The SDK guide covers the client's options, errors and retries and verifying webhooks.
One toolkit, many runtimes
Pick the SDK for your language, keep your mail library, or work from the terminal.
The TypeScript SDK
coss on npm: zero dependencies, fully typed, ESM, and the same code on Node.js, Bun, Deno and Cloudflare Workers. It refuses to run in a browser unless you opt in, so your key stays on the server.
Retries that never send twice
Network errors, timeouts, 409, 429 and 5xx responses are retried, honoring Retry-After. Every POST carries an Idempotency-Key reused across retries, and calls the API can't deduplicate are never retried.
React Email
Pass a React Email component as react and the SDK renders it into html and text. @react-email/render is an optional peer, so nobody else pays for it. Sending.
Six more languages
Python, Go, Ruby, PHP, Java and .NET SDKs are generated from the OpenAPI document, so every endpoint is in every SDK, typed, with webhook verification in each. SDKs.
Keep your mail library
coss/nodemailer, coss/better-auth and coss/authjs ship in the coss package. Laravel, Rails and Django get mail drivers of their own, switched on in configuration. Integrations.
The coss CLI
Sign in, set a project up, send, follow logs and forward webhooks to localhost. Homebrew and the install script install a standalone, notarized executable that needs no Node.js. CLI.
Install
Every package, by language and tool.
The SDKs, the drivers and the CLI are MIT licensed, so you can bundle them with anything. The OpenAPI 3.1 document describes the same API for any other client or code generator.
The CLI
coss is a command-line tool for the same API, built on the published SDK.
coss login # a personal key, approved in the browser
coss init # a development key for this project
coss emails send --simulate bounced # try a bounce with the mailbox simulator
coss logs tail --source email --level error # follow an environment's log
coss listen --forward-to localhost:3000/webhooks--json prints one object per line for scripts and agents. Executables are built for macOS, Linux (glibc and musl) and Windows on arm64 and x64, each release with its SHA256SUMS; macOS builds are signed and notarized by Apple.
Specifications
The numbers your code can rely on.
- SDK dependencies
- 0
- SDK runtimes
- Node.js 22+, Bun, Deno, Workers
- SDK retries
- 2, honoring Retry-After
- SDK timeout
- 30 s per attempt
- Generated SDKs
- Python, Go, Ruby, PHP, Java, .NET
- Framework drivers
- Laravel, Rails, Django
- API description
- OpenAPI 3.1
- Webhook signatures
- Standard Webhooks
- License
- MIT
Questions
- Which languages does coss.com have SDKs for?
- TypeScript and JavaScript (the coss package on npm), plus Python, Go, Ruby, PHP, Java and .NET, generated from the API's OpenAPI document, so every endpoint is in every SDK. Each endpoint's page in the API reference shows its call in every language.
- Does the coss TypeScript SDK work on Cloudflare Workers, Bun and Deno?
- Yes. The coss package has zero dependencies and runs unchanged on Node.js 22 and later, Bun, Deno and Cloudflare Workers.
- Does the SDK retry failed requests?
- Yes. It retries network errors, timeouts, 409, 429 and 5xx responses up to twice by default, honoring Retry-After. Every POST carries an Idempotency-Key that its retries reuse, so a retried send never goes out twice.
- Can I use coss.com with Nodemailer, Laravel, Rails or Django without rewriting my code?
- Yes. coss/nodemailer is a Nodemailer transport, and the Laravel, Rails and Django drivers replace the framework's mail transport through configuration. Better Auth and Auth.js have drop-ins for their email callbacks too.
- How do I install the coss CLI?
- With Homebrew (brew install cosscom/tap/coss), the install script, or npm install -g coss-cli. Homebrew and the install script install a standalone executable that needs no Node.js, for macOS, Linux and Windows.
- Is there an OpenAPI spec for the coss.com API?
- Yes. The API publishes an OpenAPI 3.1 document at api.coss.com/openapi.json. The API reference and the generated SDKs are built from it.
Works with
- Coding agentscoss.com for coding agents is a one-line setup for Claude Code, Cursor and Codex. Markdown docs, a sandbox key, an MCP server and an Agent Skill.
- PlatformThe coss.com platform is what every product shares. Environments and scoped keys, signed webhooks, searchable logs, dated API versions and one bill.
- Emailcoss.com Email is a transactional email API. Send single, batch and scheduled email from your domains, with templates, tracking and per-recipient webhooks.
- SMTP relaycoss.com's SMTP relay sends email from anything that speaks SMTP, with an API key as the password and the same checks, tracking and webhooks as the API.
Start with SDKs and tools today.
Development keys record every request and event and deliver nothing, so you can build and test before you verify a domain. Hand your coding agent this prompt:
Add coss.com to this project: read https://coss.com/llms.txt, get a development key with `npx coss-cli init --agents`, and build and test with it.