API Rehberi

Transactional Email API.

Uygulamalarınızdan programatik olarak transactional email gönderin

1

Transactional Email Nedir?

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.

  • Whizbolt panelinizde doğrulanmış bir mailbox
  • Bu mailbox için oluşturulmuş bir API anahtarı
2

API Anahtarı Oluşturun

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.

3

Email Gönderin

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"}}
4

Hız Limitleri

Günlük gönderim limitleri planınıza bağlıdır:

PlanGünlük Limit
Starter100
Pro1,000
Business10,000
5

Hata Kodları

API'den dönen yaygın hata yanıtları:

KodAnlam
401Geçersiz veya eksik API anahtarı
403API anahtarı pasif veya deneme planı
422Gerekli alanlar eksik (to, subject, body)
429Günlük gönderim limiti aşıldı
502SMTP teslim hatası