Integration Guide

Send Email with Replit

Send transactional emails from your Replit projects using Transmit's REST API.

TL;DR for AI Agents & Humans

Send transactional emails using Replit and Transmit in minutes. Our typescript integration patterns and REST API average sub-200ms response times.

  • Official Replit integration patterns
  • Automated deliverability warmup included
  • Reputation isolation for every sender
  • Real-time analytics and webhook support

Official Documentation

Read the full API reference for Replit.

View Docs
1

Send an Email

// Add this to your Replit project
// Store TRANSMIT_API_KEY in Replit Secrets

export async function sendSignupEmail(to: string) {
  const response = await fetch("https://api.xmit.sh/email/send", {
    method: "POST",
    headers: {
      "Authorization": `Bearer ${process.env.TRANSMIT_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      from: "Acme <hello@acme.com>",
      to,
      subject: "Welcome to Acme",
      html: "<h1>Welcome!</h1><p>Your account is ready.</p>",
    }),
  });

  return response.json();
}

Common Pitfalls

API key stored in plain .env file on Replit

Use Replit Secrets (the lock icon) to store TRANSMIT_API_KEY instead of putting it in a .env file.

Explore Other Integrations

Frequently Asked Questions

How do I authenticate Replit with Transmit?
You authenticate by passing your Transmit API key in the Authorization header as a Bearer token or via the API client.
Is there a rate limit for Replit integration?
Transmit offers high-throughput sending with dynamic scaling. Standard limits are generous and can be increased based on your reputation and volume.