Building with AI
Hand your AI coding assistant a single guide so it can integrate mailer123 correctly — the SDK, the API, and MCP.
If you build with an AI coding assistant — Claude Code, Cursor, Windsurf, Copilot, a custom GPT — you can hand it one file that teaches it everything it needs to wire mailer123 into your app correctly: the Node SDK, the REST API, the MCP option, security rules, personalization, error handling, and copy‑paste patterns for React, Node, and Next.js.
The guide
It's a single, self‑contained Markdown file served at
/skills.md:
curl https://mailer123.com/skills.mdGive it to your assistant
Drop the guide wherever your tool reads instructions:
- Claude Code — add it to your project's
CLAUDE.md, or just tell Claude to read${docsBaseUrl()}/skills.mdbefore integrating. - Cursor / Windsurf — paste it into your project rules (e.g.
.cursor/rules), or include it in the chat as context. - ChatGPT / custom GPT — paste it into the GPT's instructions, or attach it.
- Any agent — include it in the system prompt, or fetch it at runtime.
Once it has the guide, ask in plain language — "add a welcome email when a user signs up", "send a receipt from my Next.js route handler" — and it will use the right approach with your key kept server‑side.
What's inside
The guide covers the whole integration surface so the assistant doesn't have to guess:
| Section | Contents |
|---|---|
| Integration paths | When to use the SDK, the REST API, or MCP. |
| Security rules | Keep the m123_ key server‑side; call from a backend, never the browser. |
| Node SDK | Install, initialize, and use every resource — emails, contacts, groups, campaigns, templates, projects (and projects.domains) — with the { data, error } pattern. |
| REST API | Base URL, auth, the endpoint table, and fetch examples. |
| Framework patterns | Next.js route handler & server action, Express, and a safe React example. |
| Personalization | Merge variables and fallbacks. |
| Errors & limits | Error‑code table, rate limits, quotas, suppression, retries. |
| MCP | Connecting an assistant to operate the product directly. |
The guide pairs with these docs: start with the Quickstart, keep the API reference handy, and see MCP to let an assistant drive the product rather than write code.