Send Messages via API

Programmatically send emails using the SipherMail API

Endpoint
POST /api/send
Request Payload
{
  "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
    }
  ]
}
Response
{
  "ok": true,
  "messageId": "msg-abc123"
}
Error Handling

The API returns appropriate HTTP status codes:

  • 200 - Success
  • 400 - Bad request (missing fields)
  • 401 - Unauthorized
  • 403 - Forbidden (blocked sender)
  • 429 - Rate limit exceeded
  • 500 - Server error