Docs API Reference

API Overview

Introduction to the mailshit REST API for rendering and sending emails.

Base URL

All API requests should be made to:

https://api.mailsh.it/v1

Authentication

All API endpoints require authentication via Bearer token. Include your API key in the Authorization header:

Authorization: Bearer your_api_key

See Authentication for details on creating and managing API keys.

Request Format

  • All requests must use Content-Type: application/json
  • Request bodies should be valid JSON
  • All endpoints use the POST method

Response Format

All responses are JSON objects. Successful responses vary by endpoint, but error responses follow a consistent format:

{
  "error": "Description of what went wrong"
}

Available Endpoints

EndpointDescription
POST /v1/renderRender a template to HTML
POST /v1/executeExecute a flow (render + optional send)
POST /v1/verifyVerify an email address

Rate Limits

API requests are rate-limited based on your plan:

PlanRequests/minute
Free60
Pro300
Team1,000

When you exceed the rate limit, you’ll receive a 429 Too Many Requests response. The Retry-After header indicates when you can retry.

Error Codes

StatusMeaning
400Bad Request - Invalid parameters
401Unauthorized - Missing or invalid API key
404Not Found - Resource doesn’t exist
429Too Many Requests - Rate limit exceeded
500Server Error - Something went wrong on our end

SDK Support

The API is designed to be simple enough to use directly with any HTTP client. See Installation for code examples in JavaScript, Python, and Go.