Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.senderkit.com/llms.txt

Use this file to discover all available pages before exploring further.

Send a templated message from a Node.js or TypeScript app. The welcome template — its subject, layout, and copy — lives in the SenderKit dashboard, so you wire up the send call once and edit the wording later without a redeploy.
1

Install the SDK

npm install @senderkit/sdk
The core SDK has zero runtime dependencies and uses native fetch (Node.js 18+).
2

Get an API key

Create a key in the dashboard. Use an sk_test_ key while you’re wiring things up — test keys never call your providers — and switch to sk_live_ to send for real. The plaintext is shown once at creation, so copy it then.
3

Set the environment variable

export SENDERKIT_API_KEY="sk_test_..."
The SDK doesn’t read this automatically — you pass it to the constructor (next step). Storing it in the environment keeps the secret out of your source.
4

Send a message

import { SenderKit } from "@senderkit/sdk";

const senderkit = new SenderKit({ apiKey: process.env.SENDERKIT_API_KEY! });

const result = await senderkit.send({
  template: "welcome",
  to: "user@example.com",
  vars: { name: "Ada" },
});

console.log(result); // { id: "msg_…", status: "queued", livemode: false }
vars holds your template variables ({{name}}, and so on). Sends are asynchronous: the call returns status: "queued" once SenderKit accepts the message, and delivery happens out of band.
5

What to read next

  • Authentication — key types, scopes, and the curl contract.
  • Messages — track delivery and status after a send.
Prefer the terminal or an AI assistant? @senderkit/cli runs the same operations from your shell, and the MCP server exposes them to AI agents.