Integrations

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

SDKs

Both 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.

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/ and sdks/python/ — 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.

Diagnostic MCP server

A diagnostic MCP server at POST /api/mcp (JSON-RPC 2.0 over HTTP, scoped-key auth only). Five tools, all read-only diagnostics except one draft creator that never sends:

List it in your MCP registry as:

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

With a sk_live_ or sk_test_ 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: create an SMTP credential in the dashboard (Settings → SMTP credentials), 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.

Integrations — ScopedPost