SendGrid clone

SendGrid v3 mail send, dynamic templates, and marketing API stubs.

SendGrid clone

Test SendGrid mail/send and dynamic template rendering against a stateful email twin — captured messages land in an in-memory inbox with bounce and spam-trap simulation. No delivery to the real internet.

Clone ID: sendgrid (registry) · Runtime kind: email · Binary: clones-email · SDK: email

The catalog lists sendgrid; spawn and SDK calls use kind: "email". The same binary also serves Resend and SMTP capture — see Email clone for the full multi-provider surface.

Start here

QuestionAnswer
Best forTransactional mail via POST /v3/mail/send, dynamic template data, and deliverability edge cases
Connect withSendGrid SDK with base URL override, route mode for api.sendgrid.com, REST at {base}/t/{runId}/v3/..., or MCP inbox tools
Known limitsDeep clone implements POST /v3/mail/send only; marketing stats/templates are fixture-tier responses when using the fixture server
SeedsEmpty by default; seed domains via admin JSON or create over REST

MCP tools

ToolDescription
molar_clone_spawnSpawn email clone (kind: "email", optional seed)
email_inboxRead captured messages for a recipient
email_mark_bounceMark recipient as hard-bounced
molar_clone_advance_clockAdvance virtual time (domain verification, delivery timing)

REST API coverage

Deep clone (Go engine)

Stateful SendGrid-compatible REST at {base}/t/{runId}/v3/...:

  • POST /v3/mail/send — send with dynamic_template_data rendering; messages captured in inbox

Fixture tier (recorded responses)

When using the fixture server path {base}/sendgrid/api/...:

  • POST /v3/mail/send
  • GET /v3/stats
  • GET /v3/templates, GET /v3/templates/{id}, PUT /v3/templates/{id}
  • GET /v3/marketing/contacts, /v3/marketing/lists, /v3/marketing/senders

Use the deep clone for inbox capture and clock-driven delivery. Use fixtures when you only need static marketing API shapes.

Seeds and initial state

ApproachDetail
EmptyDefault — no verified domains
Admin JSONPOST /_clone/seed with { "domains": [{ "name": "example.com" }] }
Fixture seedempty (fixture tier only)
import { email } from "@molar/clones";

const clone = await email.start({ runId: "run-sendgrid-01" });
await clone.adminPost(`/_clone/seed?runId=${clone.runId}`, {
  domains: [{ name: "example.com" }],
});

Connect

ModeURL pattern
Deep REST{clone.url}/t/{runId}/v3/mail/send
Route modeMap api.sendgrid.com via molar_clone_route
SMTPPort 1025 on the email binary (same inbox)
DashboardClones explorer

Authorization: use the derived test API key from the SDK spawn response.

See Email clone for Resend, SMTP, and cross-clone receipt flows.