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
POSTmethod
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
| Endpoint | Description |
|---|---|
POST /v1/render | Render a template to HTML |
POST /v1/execute | Execute a flow (render + optional send) |
POST /v1/verify | Verify an email address |
Rate Limits
API requests are rate-limited based on your plan:
| Plan | Requests/minute |
|---|---|
| Free | 60 |
| Pro | 300 |
| Team | 1,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
| Status | Meaning |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Missing or invalid API key |
| 404 | Not Found - Resource doesn’t exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server 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.