Mailman Developer & AI Documentation
A high-performance universal email dispatch API with multi-provider pooling, quota management, and pre-built tool-calling schemas for autonomous AI agents.
Architecture Overview
Mailman acts as an intelligent intermediary between your applications/AI agents and various email service providers (Resend, Brevo, SendGrid, Postmark, AWS SES, and Custom SMTP).
Authentication
All API requests must include two custom HTTP headers issued to your client account:
| Header | Type | Description |
|---|---|---|
x-api-access-code | string | Your public client identifier (e.g. AC-9K2F-X84M) |
x-api-secret-key | string | Your private authorization key (e.g. sk_live_...) |
Dispatch Email Endpoint
https://mailman.oqens.me/api/v1/sendcurl -X POST https://mailman.oqens.me/api/v1/send \
-H "Content-Type: application/json" \
-H "x-api-access-code: YOUR_ACCESS_CODE" \
-H "x-api-secret-key: YOUR_SECRET_KEY" \
-d '{
"to": "alex@example.com",
"recipientName": "Alex",
"subject": "Order Confirmation #{{orderId}}",
"html": "<h2>Hi {{name}},</h2><p>Your order #{{orderId}} is confirmed!</p>",
"variables": {
"orderId": "884192"
}
}'Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
to | string | Required | Recipient email address |
subject | string | Optional* | Subject line (*Required if templateId is omitted) |
html | string | Optional* | HTML content (*Required if templateId is omitted) |
templateId | string | Optional | ID of pre-configured template to render |
variables | object | Optional | Key-value map for replacing {{key}} placeholders |
recipientName | string | Optional | Display name for the recipient |
fromName | string | Optional | Custom display sender name override |
attachments | array | Optional | Array of attachment objects with filename and content (base64) or path (URL) |
AI Agent Tool Calling Specifications
Give autonomous LLMs the direct capability to dispatch transactional and notification emails. Simply copy the schema below into your agent framework:
{
"type": "function",
"function": {
"name": "send_transactional_email",
"description": "Send an email notification or alert to a recipient via Mailman Universal Engine.",
"parameters": {
"type": "object",
"properties": {
"to": {
"type": "string",
"description": "The destination email address (e.g. user@example.com)"
},
"recipientName": {
"type": "string",
"description": "Recipient full or display name"
},
"subject": {
"type": "string",
"description": "The subject line of the email"
},
"html": {
"type": "string",
"description": "The HTML content body of the email"
},
"templateId": {
"type": "string",
"description": "Optional Firestore template ID to render instead of raw HTML"
},
"variables": {
"type": "object",
"description": "Key-value dictionary for placeholder substitution in templates",
"additionalProperties": { "type": "string" }
}
},
"required": ["to"]
}
}
}HTTP Status & Error Codes
| Status | Reason | Resolution |
|---|---|---|
| 200 OK | Dispatched successfully | Message ID returned in response payload. |
| 401 Unauthorized | Missing or invalid credentials | Verify x-api-access-code and x-api-secret-key headers. |
| 429 Too Many Requests | Daily quota exceeded | Your client has reached its allocated daily sending volume. Resets at midnight or contact Super Admin. |
| 503 Unavailable | Provider pool exhausted | All configured backend sender services have reached daily limits. |
Quotas & Capacity Allocation
Daily quotas protect sender reputation and deliverability across shared IP pools. Quotas automatically reset each day at 00:00 UTC.
Need an increased quota limit?
Contact the platform Super Admin (varshith.code@gmail.com) to expand your daily capacity.
Check My Quota in Console