SuperSend TX + Replit

Wire SuperSend TX into a Replit Agent project with Replit Secrets and a copy-paste agent prompt.

When to use SuperSend TX

  • Replit Agent builds that need password reset, invites, or notifications
  • Node, Python, or other backends where you control server env vars
  • Production mail from your own domain after verify

1. Add your API key

  1. Create an API key at app.supersendtx.com (stx_…).
  2. In Replit, open ToolsSecrets (or Integrations → secrets, depending on Replit UI).
  3. Create a secret:
Key Value
SUPERSENDTX_API_KEY stx_your_key_here

Replit injects secrets as environment variables in the repl runtime. Access via process.env.SUPERSENDTX_API_KEY (Node) or os.environ["SUPERSENDTX_API_KEY"] (Python).

2. Paste this prompt in Replit Agent

Integrate SuperSend TX transactional email into this Replit project.

Docs:
- https://docs.supersendtx.com/ai/agent-skill
- https://docs.supersendtx.com/openapi.yaml
- https://docs.supersendtx.com/builders/replit

Rules:
1. Read SUPERSENDTX_API_KEY from Replit Secrets (already configured). Never log or expose the key to the client.
2. Send with POST https://api.supersendtx.com/emails and Authorization: Bearer <key>.
3. Sandbox: from "noreply@mail.supersendtx.com", to only the SuperSend TX account email until a domain is verified.
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.

When ready for production, verify a sending domain in SuperSend TX and update from addresses.

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.SUPERSENDTX_API_KEY
  if (!apiKey) return res.status(500).json({ error: 'Missing SUPERSENDTX_API_KEY' })

  const upstream = await fetch('https://api.supersendtx.com/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 SuperSend TX account email only, with from: "noreply@mail.supersendtx.com", until your domain is verified.

Production

Verify your domain in SuperSend TX, then set from to noreply@yourdomain.com (or similar on that domain).