Core concepts

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:

bash
curl https://mailer123.com/skills.md

Give 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.md before 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:

SectionContents
Integration pathsWhen to use the SDK, the REST API, or MCP.
Security rulesKeep the m123_ key server‑side; call from a backend, never the browser.
Node SDKInstall, initialize, and use every resource — emails, contacts, groups, campaigns, templates, projects (and projects.domains) — with the { data, error } pattern.
REST APIBase URL, auth, the endpoint table, and fetch examples.
Framework patternsNext.js route handler & server action, Express, and a safe React example.
PersonalizationMerge variables and fallbacks.
Errors & limitsError‑code table, rate limits, quotas, suppression, retries.
MCPConnecting an assistant to operate the product directly.