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": ["user@example.com"],
"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": ["subscriber@example.com"],
"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": ["alice@company.com", "bob@company.com"],
"cc": ["manager@company.com"],
"bcc": ["archive@company.com"],
"replyTo": ["support@company.com"],
"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 'recipients=client@example.com' \
-F 'body=Please find attached your invoice.' \
-F 'isHtml=false' \
-F 'attachments=@invoice.pdf' \
-F 'attachments=@receipt.pdf'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
# }