API v1.0
SendPigeon Documentation
Everything you need to send transactional emails. SDKs for Node.js, Python, Go, PHP and REST API.
Quick Start
Send your first email in under a minute.
1
Install the SDK
Installtypescript
npm install sendpigeon2
Send an email
TypeScripttypescript
import { SendPigeon } from "sendpigeon";const pigeon = new SendPigeon("sp_live_your_api_key");const { data, error } = await pigeon.send({ from: "hello@yourdomain.com", to: "user@example.com", subject: "Welcome!", html: "<h1>Hello World</h1>"});if (error) { console.error(error.message);} else { console.log(data.id);}Get your API key from the dashboard.
3
Handle the result
Responsetypescript
// Success: { data: { id: "em_abc123", status: "sent" }, error: null }// Failure: { data: null, error: { message: "...", status: 403 } }