REST API
POST /api/v1/emails does one thing: generate a complete, ready-to-send email from a prompt. Call it from your own code. The result streams over Server-Sent Events.MCP server
46 tools for Claude, ChatGPT, Cursor, VS Code, Codex, and other MCP clients. Generate and edit emails, manage contacts and segments, read analytics, and build campaigns.
What it is not
Here’s the scope up front, so you don’t go looking for endpoints that aren’t there: To send what you generate, export the design to your ESP or send a campaign from AlpacaRelay.Base URL and reference
The interactive reference is generated from the OpenAPI spec, so it’s always in step with the running API. Use it to read exact schemas and try calls; use these pages for the surrounding explanation.
Generate a client
The spec is OpenAPI 3.1 and served publicly, so you can generate a typed client rather than hand-rolling one:A generated client will model the request correctly, but most generators treat the response as a plain string, because it’s an SSE stream rather than a JSON body. You’ll still want to parse the event stream yourself — see Generate an email for a worked example.
Get started
1
Get credentials
For REST, create an API key under Settings → API keys (workspace owners only). For MCP, you can sign in with OAuth instead. See Authentication.
2
Make your first call
Either call the REST endpoint or connect the MCP server to your editor.
3
Know the limits
One credit per generation, 60 calls a minute, three concurrent generations per workspace. See Credits and limits.