Programmatically send emails using the SipherMail API
POST /api/send{
"to": "recipient@example.com",
"cc": "cc@example.com", // optional
"bcc": "bcc@example.com", // optional
"subject": "Email Subject",
"text": "Plain text body", // optional if html provided
"html": "<p>HTML body</p>", // optional if text provided
"attachments": [ // optional
{
"id": "att-123",
"name": "document.pdf",
"url": "/uploads/...",
"type": "application/pdf",
"size": 1024
}
]
}{
"ok": true,
"messageId": "msg-abc123"
}The API returns appropriate HTTP status codes:
200 - Success400 - Bad request (missing fields)401 - Unauthorized403 - Forbidden (blocked sender)429 - Rate limit exceeded500 - Server error