API Rehberi
Uygulamalarınızdan programatik olarak transactional email gönderin
Transactional emailler, kullanıcı eylemleri tarafından tetiklenen otomatik mesajlardır — şifre sıfırlama, sipariş onayı, hoş geldin emaili ve daha fazlası. Whizbolt API, bunları herhangi bir uygulamadan göndermenize olanak tanır.
Paneldeki API Anahtarları bölümüne gidin, bir mailbox seçin ve yeni bir anahtar oluşturun. Anahtar yalnızca bir kez gösterilecektir — kopyalayıp güvenli bir yerde saklayın.
X-API-Key header'ında API anahtarınızla send endpoint'ine bir POST isteği gönderin.
cURL
curl -X POST https://api.whizbolt.com/api/v1/send \
-H "X-API-Key: whiz_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"to": ["recipient@example.com"],
"subject": "Hello from Whizbolt",
"html_body": "<h1>Hello!</h1><p>Your message here.</p>"
}'Node.js (fetch)
const response = await fetch("https://api.whizbolt.com/api/v1/send", {
method: "POST",
headers: {
"X-API-Key": "whiz_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
to: ["recipient@example.com"],
subject: "Hello from Whizbolt",
html_body: "<h1>Hello!</h1><p>Your message here.</p>",
}),
});
const data = await response.json();
console.log(data); // { data: { message_id: "...", status: "sent" } }Python (requests)
import requests
response = requests.post(
"https://api.whizbolt.com/api/v1/send",
headers={"X-API-Key": "whiz_your_api_key"},
json={
"to": ["recipient@example.com"],
"subject": "Hello from Whizbolt",
"html_body": "<h1>Hello!</h1><p>Your message here.</p>",
},
)
print(response.json()) # {"data": {"message_id": "...", "status": "sent"}}Günlük gönderim limitleri planınıza bağlıdır:
| Plan | Günlük Limit |
|---|---|
| Starter | 100 |
| Pro | 1,000 |
| Business | 10,000 |
API'den dönen yaygın hata yanıtları:
| Kod | Anlam |
|---|---|
| 401 | Geçersiz veya eksik API anahtarı |
| 403 | API anahtarı pasif veya deneme planı |
| 422 | Gerekli alanlar eksik (to, subject, body) |
| 429 | Günlük gönderim limiti aşıldı |
| 502 | SMTP teslim hatası |