API Reference 🤖

Authentication

Labsmail uses Bearer Token authentication. You need to include your API Key in the `Authorization` header of every request.

Authorization: Bearer lm_123456...

Send Email

The primary endpoint to send transactional emails.

POST/api/v1/send

Request Body

{
  "to": "user@example.com",
  "subject": "Welcome to Labsmail!",
  "html": "<h1>Hello!</h1>",
  "text": "Hello! (fallback)"
}

Example (cURL)

curl -X POST https://labsmail.com/api/v1/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "customer@example.com",
    "subject": "Your receipt",
    "html": "<strong>Thanks for purchasing!</strong>"
  }'

Response

{
  "success": true,
  "message": "Email queued successfully",
  "id": "123"
}