Integrations

SDKs, samples, migration, and the diagnostic MCP server — everything that plugs ScopedPost into something else.

SDKs

All three SDKs are thin: auth, 429/5xx retry with Retry-After, idempotency keys, and Svix-style webhook verification. Neither invents an endpoint — the contract tests assert every path the SDK calls exists in the OpenAPI spec.

TypeScript — @scopedpost/sdk 0.1.0

Node ≥ 18. Covers send, get, idempotency keys, and webhook verification.

npm install @scopedpost/sdk

Live on npm as @scopedpost/sdk 0.1.0.

Python — scopedpost 0.1.0

Python ≥ 3.9, stdlib only. Same surface as the TypeScript SDK, in lockstep.

pip install scopedpost

Live on PyPI as scopedpost 0.1.0.

Go — scopedpost-go 0.1.0

Go ≥ 1.22, stdlib only. Same surface as the TypeScript SDK, in lockstep.

go get github.com/dprog22/ScopedPost/sdks/go

In the ScopedPost repo — public release to follow.

Not yet in the SDKs: batch send and cancel — call the API directly until the 0.2.0 SDKs add them. See Developers for the endpoint list.

Code samples

TypeScript — send with the SDK

import { ScopedPostClient } from "@scopedpost/sdk";

const client = new ScopedPostClient({
  apiKey: process.env.SCOPEDPOST_API_KEY,
});
const { id } = await client.sendEmail({
  from: "welcome@your-domain.com",
  to: ["ada@example.com"],
  subject: "Welcome",
  text: "Your first scoped send.",
});
console.log(id); // msg_…

Python — send with the SDK

import os
from scopedpost import ScopedPostClient

client = ScopedPostClient(api_key=os.environ["SCOPEDPOST_API_KEY"])
result = client.send_email(
    from_addr="welcome@your-domain.com",
    to=["ada@example.com"],
    subject="Welcome",
    text="Your first scoped send.",
)
print(result["id"])  # msg_…

Samples follow the quickstarts in examples/quickstarts/. The exact client method names are the SDK surface in sdks/typescript/src/, sdks/python/, and sdks/go/ — the contract tests keep them honest against the API.

Migration centre

Moving from Resend or Postmark? The migration centre in the dashboard imports your domains, templates and suppressions (up to 10,000 items, idempotent), shows a rollback plan before anything runs, and can roll back. Open the dashboard and choose a team → Migration.

MCP server

An MCP server at POST /api/mcp (JSON-RPC 2.0 over HTTP, scoped-key auth only). Ten tools — diagnostics plus sending and management, all over the same services the REST API uses. Sending goes through the policy engine exactly like POST /api/emails: an approval-mode agent gets a draft, never a send; a test key captures, never sends.

List it in your MCP registry as:

{ "name": "scopedpost", "url": "https://scopedpost.com/api/mcp" }

With a sk_live_, sk_test_ or sk_agent_ key in the Authorization header. Every tools/call is audit-logged with the calling key and agent.

Supabase Auth over SMTP

Point Supabase Auth at ScopedPost's SMTP relay instead of Supabase's shared sender: there is no native integration to install — Supabase talks to ScopedPost over SMTP, and Supabase keeps rendering its own templates while we deliver them. Set it up with the step-by-step guide, or use the guided setup in the dashboard (Settings → SMTP credentials → Set up Supabase), which fills in the values for you: create an SMTP credential, then enable Custom SMTP in Supabase with host smtp.scopedpost.com, port 587, and the credential. SMTP credentials are scoped the same way API keys are — one credential per domain, revocable independently.

Vercel

Connect your Vercel account and link a project: ScopedPost creates a dedicated send-only API key named for the project and sets it as the SCOPEDPOST_API_KEY env var on that project (Production, Preview and Development), so your deployments can send email without a key copied by hand. Set it up with the step-by-step guide, or from the dashboard (Settings → Connect Vercel). There is no Marketplace listing yet — the integration is installed from your Vercel account directly, and the listing is a partner application still to come. Disconnecting revokes the key and deletes the env var; uninstalling in Vercel revokes the token.

Integrations — ScopedPost