Getting Started with the MisarMail API
Overview
The MisarMail REST API allows you to manage contacts, send transactional emails, trigger automation events, and retrieve campaign analytics programmatically.
Authentication
All API requests require an API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Generate API keys from Settings → API Keys. Store keys securely — treat them like passwords. Never include API keys in client-side JavaScript or public repositories.
Base URL
https://mail.misar.io/api/v1
Adding a Contact
POST /api/v1/contacts
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"email": "[email protected]",
"first_name": "Jane",
"last_name": "Smith",
"tags": ["customer", "newsletter"],
"custom_fields": {
"company": "Acme Inc",
"plan": "pro"
}
}
Sending a Transactional Email
POST /api/v1/send
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"to": "[email protected]",
"from": "[email protected]",
"subject": "Your order confirmation",
"html": "<p>Thank you for your order!</p>",
"text": "Thank you for your order!"
}
Triggering an Automation Event
POST /api/v1/events
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"email": "[email protected]",
"event": "purchase_completed",
"properties": {
"order_id": "1234",
"total": 99.00
}
}
Rate Limits
- Standard API endpoints: 1,000 requests/minute
- Bulk operations (imports): 10 requests/minute
- Transactional send: based on your plan's send limit
Rate limit headers are included in every API response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.
Full API Reference
Complete endpoint documentation with request/response examples is available at mail.misar.io/docs/api.