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
| Question | Answer |
|---|---|
| Best for | Transactional mail via POST /v3/mail/send, dynamic template data, and deliverability edge cases |
| Connect with | SendGrid SDK with base URL override, route mode for api.sendgrid.com, REST at {base}/t/{runId}/v3/..., or MCP inbox tools |
| Known limits | Deep clone implements POST /v3/mail/send only; marketing stats/templates are fixture-tier responses when using the fixture server |
| Seeds | Empty by default; seed domains via admin JSON or create over REST |
MCP tools
| Tool | Description |
|---|---|
molar_clone_spawn | Spawn email clone (kind: "email", optional seed) |
email_inbox | Read captured messages for a recipient |
email_mark_bounce | Mark recipient as hard-bounced |
molar_clone_advance_clock | Advance 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 withdynamic_template_datarendering; messages captured in inbox
Fixture tier (recorded responses)
When using the fixture server path {base}/sendgrid/api/...:
POST /v3/mail/sendGET /v3/statsGET /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
| Approach | Detail |
|---|---|
| Empty | Default — no verified domains |
| Admin JSON | POST /_clone/seed with { "domains": [{ "name": "example.com" }] } |
| Fixture seed | empty (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
| Mode | URL pattern |
|---|---|
| Deep REST | {clone.url}/t/{runId}/v3/mail/send |
| Route mode | Map api.sendgrid.com via molar_clone_route |
| SMTP | Port 1025 on the email binary (same inbox) |
| Dashboard | Clones explorer |
Authorization: use the derived test API key from the SDK spawn response.
See Email clone for Resend, SMTP, and cross-clone receipt flows.