Docs Getting Started

Installation

Requirements and setup options for using mailshit.

Requirements

mailshit is a hosted platform—there’s nothing to install locally. You just need:

  • A modern web browser (Chrome, Firefox, Safari, Edge)
  • An email provider account (Resend, SendGrid, etc.)

That’s it. No local setup, no dependencies, no build tools.

API Access

To integrate mailshit with your application, you’ll use the REST API.

Base URL

https://api.mailsh.it

Authentication

All API requests require a Bearer token. Create an API key in Settings > API Keys.

curl -H "Authorization: Bearer your_api_key" \
  https://api.mailsh.it/v1/render

Rate Limits

PlanRequests/minuteEmails/month
Free60100
Pro30010,000
Team1,000100,000

SDK Options

While mailshit doesn’t require an SDK—the API is simple enough to use directly—here are some patterns for common languages:

JavaScript/TypeScript

async function sendEmail(templateId: string, to: string, variables: Record<string, string>) {
  const response = await fetch('https://api.mailsh.it/v1/execute', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.MAILSHIT_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      templateId,
      variables,
      _to: to,
    }),
  })

  return response.json()
}

Python

import requests
import os

def send_email(template_id: str, to: str, variables: dict):
    response = requests.post(
        'https://api.mailsh.it/v1/execute',
        headers={
            'Authorization': f'Bearer {os.environ["MAILSHIT_API_KEY"]}',
            'Content-Type': 'application/json',
        },
        json={
            'templateId': template_id,
            'variables': variables,
            '_to': to,
        },
    )
    return response.json()

Go

func sendEmail(templateID, to string, variables map[string]string) error {
    payload := map[string]interface{}{
        "templateId": templateID,
        "variables":  variables,
        "_to":        to,
    }

    body, _ := json.Marshal(payload)

    req, _ := http.NewRequest("POST", "https://api.mailsh.it/v1/execute", bytes.NewBuffer(body))
    req.Header.Set("Authorization", "Bearer "+os.Getenv("MAILSHIT_API_KEY"))
    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    resp, err := client.Do(req)
    // handle response...
}

Environment Variables

We recommend storing your API key in an environment variable:

# .env
MAILSHIT_API_KEY=your_api_key_here

Never commit API keys to version control.

Export Options

If you prefer to self-host your email rendering, you can export templates as production-ready HTML with inline styles using the Export button in the template editor.

Next Steps