API Documentation
Send emails programmatically via our REST API
Basic text or HTML email to one or more recipients
curl -X POST https://api.mailbridge.wilfrix.com//v1/send \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"subject": "Welcome to MailBridge",
"recipients": ["[email protected]"],
"body": "<h1>Hello!</h1><p>Welcome aboard.</p>",
"isHtml": true
}'Improve deliverability by auto-generating plain text alternative
curl -X POST https://api.mailbridge.wilfrix.com//v1/send \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"subject": "Newsletter",
"recipients": ["[email protected]"],
"body": "<h2>Latest Updates</h2><p>Check out our new features!</p>",
"isHtml": true,
"textAlternative": true
}'Send to multiple recipients with carbon copy
curl -X POST https://api.mailbridge.wilfrix.com//v1/send \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"subject": "Team Update",
"recipients": ["[email protected]", "[email protected]"],
"cc": ["[email protected]"],
"bcc": ["[email protected]"],
"replyTo": ["[email protected]"],
"body": "Weekly team sync notes...",
"isHtml": false
}'Attach files (STARTER/PRO plans only)
curl -X POST https://api.mailbridge.wilfrix.com//v1/send-with-attachments \
-H "X-API-Key: YOUR_API_KEY" \
-F 'subject=Invoice #123' \
-F '[email protected]' \
-F 'body=Please find attached your invoice.' \
-F 'isHtml=false' \
-F '[email protected]' \
-F '[email protected]'Track delivery status of sent emails
curl -X GET https://api.mailbridge.wilfrix.com//v1/status/EMAIL_ID \
-H "X-API-Key: YOUR_API_KEY"
# Response:
# {
# "id": "...",
# "status": "sent",
# "createdAt": "2025-02-24T10:00:00Z",
# "sentAt": "2025-02-24T10:00:05Z"
# ...
# }Monitor your daily email quota
curl -X GET https://api.mailbridge.wilfrix.com//v1/usage \
-H "X-API-Key: YOUR_API_KEY"
# Response:
# {
# "plan": "pro",
# "emailsSentLast24H": 45,
# "emailsRemaining24H": 455,
# "dailyLimit": 500
# }