FIG.1
DECKLE / DEVELOPERS
DEVELOPERS · 04

An API you'll enjoy using.

One clean /v1 surface — 26 endpoints, a zero-dependency SDK, an SMTP relay and an MCP server. Send from your own verified domain in a single call.

Three ways in

Pick your integration, ship today

The SDK for typed code, MCP for AI agents, SMTP for anything that already speaks mail. Same keys, same domain, same delivery.

@deckle/sdk

Zero-dependency and isomorphic — one package for Node, Deno, Bun and the browser. Typed resources for emails, contacts, events, campaigns, templates and automations, with built-in webhook-signature verification.

send.ts
import { Deckle } from "@deckle/sdk"
const deckle = new Deckle(process.env.DECKLE_API_KEY)

await deckle.emails.send({
  from: "Ada <ada@mail.acme.com>",
  to:   "user@example.com",
  template: "welcome",
  data: { first_name: "Sam" },
})

deckle-mcp

Drop one block into any client's config and your agent can author templates, launch campaigns, wire automations and manage contacts end-to-end — 27 tools, no glue code. Works with Claude Code, Claude Desktop, Cursor, Codex CLI and GitHub Copilot.

.mcp.json
# 27 tools · 5 AI clients
{
  "mcpServers": {
    "deckle": {
      "command": "npx",
      "args": ["-y", "@deckle/mcp"],
      "env": { "DECKLE_API_KEY": "dk_live_…" }
    }
  }
}

SMTP relay

Already have a mailer? Point it at smtp.getdeckle.com on port 587 or 465 — the username is anything, the password is your API key. No rewrite, just swap the credentials.

smtp.env
SMTP_HOST=smtp.getdeckle.com
SMTP_PORT=587   # or 465 for implicit TLS
SMTP_USER=deckle   # any value works
SMTP_PASS=dk_live_…   # your API key
Reference

The /v1 REST API

Predictable, resource-oriented routes over HTTPS — JSON in, JSON out, versioned and idempotent. Every object you touch in the app is here too.

POST/v1/emailsSend a single email or template
GET/v1/emails/:idRetrieve one email & its status
GET/v1/contactsList contacts, filter by segment
POST/v1/contactsCreate or upsert a contact
POST/v1/eventsRecord a custom event
GET/v1/campaignsList campaigns & their reports
POST/v1/automationsCreate an automation flow
GET/v1/templatesList designed templates
DELETE/v1/suppressions/:emailRemove an address from suppression
One platform, three surfaces

Send it however you send

Transactional API

A REST endpoint for receipts, magic links and welcome mails — merge tags, auto plain-text and an unsubscribe footer are handled for you by React Email.

SMTP relay

Drop-in SMTP on 587 / 465 for any framework, CMS or legacy stack. Keep your existing mailer — just repoint the host and pass an API key.

Webhooks & events

Subscribe to five signed events — delivered, bounced, complained, opened, clicked — or POST your own events to trigger automations downstream.

MCP SERVER

Give your agent the whole platform

The Deckle MCP server exposes 27 tools across every resource, so an agent can design a template, run a campaign or wire an automation without touching the dashboard.

  • 27 tools — emails, contacts, events, campaigns, automations, templates and suppressions.
  • 5 clients — Claude Code, Claude Desktop, Cursor, Codex CLI and GitHub Copilot.
  • One commandnpx -y @deckle/mcp, scoped to your API key.
MCP setup guide
FIG.2
agent · session
$ npx -y @deckle/mcp
✓ connected · 27 tools registered

 agent: launch the spring campaign
# deckle.campaigns.create
# deckle.campaigns.schedule
"scheduled · 3 A/B variants · 20% slice"

 agent: enroll new trials in onboarding
# deckle.automations.create
"live · trigger trial.started"
Built for production

The details that keep you shipping

Keys you can rotate, requests you can retry, limits you can plan around, and webhooks you can trust.

Test & live keys

Ship against a sandbox with dk_test_… keys, then flip to dk_live_… for real sends. Rotate either without downtime.

Idempotency

Pass an idempotency key per request so a retried call never sends twice — safe for timeouts, queues and at-least-once delivery.

Rate limits

Every response carries limit, remaining and reset headers, so you can back off cleanly instead of guessing when to retry.

HMAC-signed webhooks

Five events — email.delivered, bounced, complained, opened and clicked — each signed so you can verify it came from Deckle. The SDK does the check in one line.

webhook.ts
import { verifyWebhook } from "@deckle/sdk"

const event = verifyWebhook(req.body, {
  signature: req.headers["deckle-signature"],
  secret: process.env.DECKLE_WEBHOOK_SECRET,
})

if (event.type === "email.bounced") suppress(event.data.to)
Get started

Own your sending.

Free to start, no credit card. Send from your verified domain.