SDKs
Node.js and TypeScript
Section titled “Node.js and TypeScript”@all2cf/send is public on npm and verified from clean npm and pnpm installations. Both package managers use the same npm Registry package.
npm install @all2cf/send# orpnpm add @all2cf/sendimport { CFsend } from "@all2cf/send";
const send = new CFsend(process.env.ALL2CF_SEND_KEY, { baseUrl: process.env.ALL2CF_SEND_URL,});
await send.emails.send({ from: "hello@example.com", to: "customer@example.net", subject: "Your receipt", html: "<h1>Paid</h1>",});The client returns { data, error } rather than hiding API failures. Set ALL2CF_SEND_URL and ALL2CF_SEND_KEY, or pass an explicit URL to the constructor. A custom fetch and timeout are supported.
Available client surfaces
Section titled “Available client surfaces”emails.send/get/list/cancel/update/retryand attachment readsbatch.sendwith idempotency and validation mode- templates, webhooks, API keys, domains and logs
- suppressions, topics and subscription preferences
const { data, error } = await send.emails.send({ from: "hello@example.com", to: "customer@example.net", subject: "Welcome", template: { id: "welcome", environment: "production", variables: { name: "Mina" } }, idempotencyKey: "welcome-user-42",});if (error) throw new Error(`${error.name}: ${error.message}`);Other languages
Section titled “Other languages”Python, PHP, Go, Java, .NET, Ruby and Rust source packages follow the same public REST contract and require the customer Runtime URL and key. They remain source previews until each named registry shows the released package and a clean-install send is recorded. Do not use a Business Mail package or a shared All2CF endpoint.