API Documentation & OpenAPI 3.0.3
Baobab Mail API Reference
Modern transactional REST API, domain-linked inbound email, DomainNameAPI reseller endpoints, and SMTP relay. Authenticate with a bm_... Bearer token from your dashboard or test live inside Swagger UI.
API Base URL (BAOBAB_MAIL_API_URL)
https://baobabmail.dev/apiCopy to clipboardPOST
/api/emailsSend an email
Send a single transactional email, attach files, schedule for later, or render a saved template. Supports Idempotency-Key header.
Request payload
{
"from": "Hello <hello@yourdomain.com>",
"to": [
"customer@example.com"
],
"subject": "Welcome to Baobab Mail",
"html": "<h1>Welcome!</h1><p>Your account is ready.</p>",
"reply_to": [
"support@yourdomain.com"
],
"tags": [
{
"name": "category",
"value": "onboarding"
}
]
}200 OK Response
{
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794",
"from": "Hello <hello@yourdomain.com>",
"to": [
"customer@example.com"
],
"created_at": "2026-12-04T10:30:00.000Z"
}Interactive Request Builder
Customize the fields below to generate a ready-to-run cURL request for your terminal.
cURL command
curl -X POST "https://baobabmail.dev/api/emails" \
-H "Authorization: Bearer $BAOBAB_MAIL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Hello <hello@yourdomain.com>",
"to": [
"customer@example.com"
],
"subject": "Hello from Baobab Mail",
"html": "<strong>It works!</strong>"
}'