Quick Start
This guide will help you send your first email using Zeabur Email in minutes.
Prerequisites
Before you begin, you’ll need:
- A Zeabur account
- Zeabur Email service enabled in your Zeabur console
- At least one verified sender domain
- An API key
Step 1: Create an API Key
Log in to Zeabur Console
Visit Zeabur Dashboard and log in to your account.
Navigate to Zeabur Email Management
Find the Zeabur Email service in the console and enter the management page.
Create a New API Key
- Click the “Create API Key” button
- Select permission type:
- Read Only: Can only query email status
- Send Only: Can send emails and query status (recommended for production)
- Full Access: Includes all operation permissions
- Optional: Restrict domain permissions (can only send from specific domains)
- Click “Create”
Save your API key immediately after creation - it will only be shown once!
Step 2: Verify Your Domain
To send emails, you need to verify your sender domain first:
Add Domain
In the “Domain Management” section of the Zeabur Email management page, click “Add Domain”.
Configure DNS Records
The system will generate DKIM, SPF, and DMARC records. You need to add these records at your domain’s DNS provider.
Wait for Verification
After adding the DNS records, click the “Verify” button. Verification usually takes a few minutes to a few hours.
Step 3: Send Your First Email
Once your domain is verified, you’re ready to send emails!
Using cURL
curl -X POST https://api.zeabur.com/api/v1/zsend/emails \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"from": "hello@yourdomain.com",
"to": ["user@example.com"],
"subject": "Hello from Zeabur Email!",
"html": "<h1>Hello!</h1><p>This is my first email from Zeabur Email.</p>",
"text": "Hello! This is my first email from Zeabur Email."
}'Using JavaScript/Node.js
const response = await fetch('https://api.zeabur.com/api/v1/zsend/emails', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
from: 'hello@yourdomain.com',
to: ['user@example.com'],
subject: 'Hello from Zeabur Email!',
html: '<h1>Hello!</h1><p>This is my first email from Zeabur Email.</p>',
text: 'Hello! This is my first email from Zeabur Email.'
})
});
const data = await response.json();
console.log('Email sent:', data);Using Python
import requests
response = requests.post(
'https://api.zeabur.com/api/v1/zsend/emails',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
json={
'from': 'hello@yourdomain.com',
'to': ['user@example.com'],
'subject': 'Hello from Zeabur Email!',
'html': '<h1>Hello!</h1><p>This is my first email from Zeabur Email.</p>',
'text': 'Hello! This is my first email from Zeabur Email.'
}
)
print('Email sent:', response.json())Using Go
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
payload := map[string]interface{}{
"from": "hello@yourdomain.com",
"to": []string{"user@example.com"},
"subject": "Hello from Zeabur Email!",
"html": "<h1>Hello!</h1><p>This is my first email from Zeabur Email.</p>",
"text": "Hello! This is my first email from Zeabur Email.",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", "https://api.zeabur.com/api/v1/zsend/emails", bytes.NewBuffer(jsonData))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Email sent! Status:", resp.Status)
}Response Example
After successful sending, you’ll receive a response like this:
{
"email_id": "696de2c84210d814d66ee052",
"status": "queued",
"message": "Email queued for sending"
}Next Steps
You’ve successfully sent your first email! Now you can:
- Check out the REST API Reference to learn about more features
- Configure Webhooks to receive email status notifications
- Learn how to send emails with attachments
- Explore scheduled sending and batch sending
Having issues? Check our troubleshooting guide or contact support.