API Dokümantasyonu
TempMail API v1 Referansı
Temel URL
https://mail.taohuaxin.topKimlik Doğrulama
/config dışındaki tüm uç noktalar kimlik doğrulama gerektirir.
Tüm isteklere aşağıdaki başlığı ekleyin:
x-api-key: tm_your_token_hereToken'ınızı şuradan alın: Panel → Ayarlar → API Anahtarları
Uç Noktalar
| Yöntem | Yol | Açıklama |
|---|---|---|
| GET | /api/v1/config | Sunucu yapılandırması (herkese açık — kimlik doğrulama gerektirmez) |
| GET | /api/v1/me | Tüm posta kutularındaki e-postaları al (uzun yoklama) |
| GET | /api/v1/inbox/:address | Tek bir posta kutusu için e-postaları al (uzun yoklama) |
| DELETE | /api/v1/inbox/:address | Bir posta kutusundaki tüm e-postaları temizle |
| GET | /api/v1/email/:id | Tam ayrıştırılmış e-postayı al (metin + html + ekler) |
| GET | /api/v1/email/:id/rendered | İşlenmiş e-posta metnini al |
| GET | /api/v1/email/:id/attachments/:attachmentId | Bir eki ID'ye göre indir |
| DELETE | /api/v1/email/:id | Tek bir e-postayı sil |
| GET | /api/v1/domains | Özel alan adlarınızı listele |
| POST | /api/v1/domains | Özel alan adı ekle |
| DELETE | /api/v1/domains/:id | Özel alan adını kaldır |
docs.examples
/api/v1/configSunucu yapılandırması (herkese açık — kimlik doğrulama gerektirmez)
curl https://mail.taohuaxin.top/api/v1/configdocs.response
{
"domains": ["taohuaxin.top"],
"smtpPort": 25,
"smtpsPort": 465,
"mxPort": 25,
"version": "1.0.0"
}/api/v1/meTüm posta kutularındaki e-postaları al (uzun yoklama)
curl -H "x-api-key: tm_your_token_here" \
"https://mail.taohuaxin.top/api/v1/me?count=1&limit=20"docs.response
{
"emails": [
{
"id": "cmcg2a1b40001xyz",
"fromAddress": "[email protected]",
"subject": "Your verification code",
"isRead": false,
"receivedAt": "2026-07-10T08:30:00.000Z",
"mailbox": { "address": "alice", "domain": "taohuaxin.top" }
}
],
"nextSince": "cmcg2a1b40001xyz"
}/api/v1/inbox/:addressTek bir posta kutusu için e-postaları al (uzun yoklama)
curl -H "x-api-key: tm_your_token_here" \
"https://mail.taohuaxin.top/api/v1/inbox/[email protected]?since=cmcg2a1b40001xyz&count=1"docs.response
{
"emails": [
{
"id": "cmcg9f2c80002abc",
"fromAddress": "[email protected]",
"subject": "Welcome!",
"isRead": false,
"receivedAt": "2026-07-10T09:00:00.000Z"
}
],
"nextSince": "cmcg9f2c80002abc"
}/api/v1/inbox/:addressBir posta kutusundaki tüm e-postaları temizle
curl -X DELETE -H "x-api-key: tm_your_token_here" \
"https://mail.taohuaxin.top/api/v1/inbox/[email protected]"docs.response
{ "success": true }/api/v1/email/:idTam ayrıştırılmış e-postayı al (metin + html + ekler)
curl -H "x-api-key: tm_your_token_here" \
"https://mail.taohuaxin.top/api/v1/email/cmcg2a1b40001xyz"docs.response
{
"id": "cmcg2a1b40001xyz",
"fromAddress": "[email protected]",
"toAddress": "[email protected]",
"subject": "Your verification code",
"bodyHtml": "<p>Your code is <b>123456</b></p>",
"bodyText": "Your code is 123456",
"isRead": true,
"receivedAt": "2026-07-10T08:30:00.000Z",
"attachments": [
{ "id": "att_01", "filename": "invoice.pdf", "mimeType": "application/pdf", "size": 24580 }
]
}/api/v1/email/:id/renderedİşlenmiş e-posta metnini al
curl -H "x-api-key: tm_your_token_here" \
"https://mail.taohuaxin.top/api/v1/email/cmcg2a1b40001xyz/rendered"docs.response
From: [email protected]
To: [email protected]
Subject: Your verification code
Date: Fri, 10 Jul 2026 08:30:00 GMT
<p>Your code is <b>123456</b></p>/api/v1/email/:id/attachments/:attachmentIdBir eki ID'ye göre indir
curl -OJ -H "x-api-key: tm_your_token_here" \
"https://mail.taohuaxin.top/api/v1/email/cmcg2a1b40001xyz/attachments/att_01"docs.response
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Disposition: attachment; filename="invoice.pdf"
Content-Length: 24580
<binary file stream>/api/v1/email/:idTek bir e-postayı sil
curl -X DELETE -H "x-api-key: tm_your_token_here" \
"https://mail.taohuaxin.top/api/v1/email/cmcg2a1b40001xyz"docs.response
{ "success": true }/api/v1/domainsÖzel alan adlarınızı listele
curl -H "x-api-key: tm_your_token_here" \
"https://mail.taohuaxin.top/api/v1/domains"docs.response
[
{
"id": "dom_01",
"domain": "mail.example.com",
"verified": true,
"receiveMode": "inherit",
"createdAt": "2026-07-01T00:00:00.000Z"
}
]/api/v1/domainsÖzel alan adı ekle
curl -X POST -H "x-api-key: tm_your_token_here" \
-H "Content-Type: application/json" \
-d '{"domain":"mail.example.com","receiveMode":"inherit"}' \
"https://mail.taohuaxin.top/api/v1/domains"docs.response
{
"id": "dom_02",
"domain": "mail.example.com",
"verified": false,
"receiveMode": "inherit",
"createdAt": "2026-07-10T10:00:00.000Z"
}/api/v1/domains/:idÖzel alan adını kaldır
curl -X DELETE -H "x-api-key: tm_your_token_here" \
"https://mail.taohuaxin.top/api/v1/domains/dom_02"docs.response
{ "success": true }Uzun Yoklama
Posta kutusu uç noktaları uzun yoklamayı destekler. Bir kez çağırın ve sunucu posta gelene kadar bekler (en fazla 25 sn). Zaman aşımından önce posta gelmezse 204 döndürür.
Sorgu Parametreleri
| Parametre | Açıklama |
|---|---|
| since | Önceki yanıttan imleç; yalnızca bu noktadan sonraki postalar döndürülür |
| count | N yeni e-posta geldiğinde döndür (varsayılan 1, maks 50) |
| limit | Yanıt başına maksimum e-posta sayısı (varsayılan 20, maks 50) |
| from | Filtrele — yalnızca Kimden alanı bu alt dizeyi içeren postaları döndür |
| subject | Filtrele — yalnızca Konu alanı bu alt dizeyi içeren postaları döndür |
Silme Davranışı
Tüm DELETE işlemleri yumuşak silmedir: silinen öğeler kullanıcılardan gizlenir ancak denetim amaçları için yöneticiler tarafından erişilebilir kalır.