TypeScript — @scopedpost/sdk 0.1.0
Node ≥ 18. Covers send, get, idempotency keys, and webhook verification.
npm install @scopedpost/sdkLive on npm as @scopedpost/sdk 0.1.0.
SDKs, samples, migration, and the diagnostic MCP server — everything that plugs ScopedPost into something else.
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.
Node ≥ 18. Covers send, get, idempotency keys, and webhook verification.
npm install @scopedpost/sdkLive on npm as @scopedpost/sdk 0.1.0.
Python ≥ 3.9, stdlib only. Same surface as the TypeScript SDK, in lockstep.
pip install scopedpostLive on PyPI as scopedpost 0.1.0.
Go ≥ 1.22, stdlib only. Same surface as the TypeScript SDK, in lockstep.
go get github.com/dprog22/ScopedPost/sdks/goIn 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.
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_…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.
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.
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.
send_email — send an email (same validation, policy, caps, idempotency and rate limits as the API).get_email — one message's status, event trail and provider response. Statuses only — no body, no subject, no recipient addresses.list_emails — recent sends, newest first, cursor-paginated (at most 50). Statuses and counts only.list_domains — the team's sending domains with verification status.list_webhooks — webhook endpoints with event subscriptions and delivery health (no signing secrets).explain_bounce — why a message bounced or failed, in plain language, with the raw provider response.check_suppression — whether an address is suppressed and why. Returns hashes, never the address.why_spam — why mail from a domain may be landing in spam: spam rate, complaint/bounce rates, and SPF/DKIM/DMARC status.draft_with_approval — create a send draft a human must approve. Routes through the policy engine; never sends.list_agent_activity — an agent's recent sends, receives, approvals and rejections (at most 50 rows; agent keys see only their own).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.
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.
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.