Ranla + Replit

Two install surfaces, depending on the job:

Surface Use when
MCP (Agent tools) Replit Agent should call Ranla (send, domains, templates) while building
Secrets + app code Your running repl sends mail (password reset, invites, notifications)

Most projects use both: MCP while building, Secrets for production paths in the app.

Add to Replit (MCP)

One-click install of the hosted MCP server (https://mcp.ranla.ai/mcp). Replit uses OAuth — no API key in the link.

Install Ranla

Or open: Add Ranla MCP

After install, authorize with your Ranla account when prompted. Full MCP docs: MCP server.

Wire email into your app (Secrets)

1. Add your API key

  1. Create an API key at app.ranla.ai (rnl_…).
  2. In Replit, open ToolsSecrets (or Integrations → secrets, depending on Replit UI).
  3. Create a secret:
Key Value
RANLA_API_KEY rnl_your_key_here

Replit injects secrets as environment variables. Access via process.env.RANLA_API_KEY (Node) or os.environ["RANLA_API_KEY"] (Python). Never expose the key to the client.

2. Paste this prompt in Replit Agent

Integrate Ranla transactional email into this Replit project.

Docs:
- https://docs.ranla.ai/ai/agent-skill
- https://docs.ranla.ai/openapi.yaml
- https://docs.ranla.ai/builders/replit
- https://docs.ranla.ai/ai/mcp

Rules:
1. Read RANLA_API_KEY from Replit Secrets (already configured). Never log or expose the key to the client.
2. Send with POST https://api.ranla.ai/emails and Authorization: Bearer <key>.
3. Until domain verification and Free production unlock (both required: verified domain + payment method on file), use from "[email protected]" and send only to the Ranla account email.
4. Implement server-side email for at least one flow (welcome, reset, or notification).
5. Use html and text fields; prefer supersendtx npm package on Node.

For production: verify a domain, add a payment method to unlock Free production (no charge until you upgrade), then set from to an address on that domain. Upgrade to Pro or Scale for more volume.

3. Minimal Express route (Node)

import express from 'express'

const app = express()
app.use(express.json())

app.post('/api/send-test', async (req, res) => {
  const apiKey = process.env.RANLA_API_KEY
  if (!apiKey) return res.status(500).json({ error: 'Missing RANLA_API_KEY' })

  const upstream = await fetch('https://api.ranla.ai/emails', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${apiKey}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify(req.body),
  })

  const data = await upstream.json()
  res.status(upstream.status).json(data)
})

Sandbox self-test

Send to your Ranla account email only, with from: "[email protected]", until your domain is verified and Free production is unlocked (payment method on file).

Production

  1. Verify a sending domain in Ranla.
  2. Add a payment method to unlock Free production (no charge until you upgrade), or upgrade for higher volume.
  3. Set from to [email protected] (or similar on your verified domain).