WhatsApp mesaj gönderimi ve hesap yönetimi.
POST
/api/v1/whatsapp/gonder
Mesaj Gönder
Belirtilen numaraya WhatsApp mesajı gönderir. Ülke kodu dahil telefon numarası gereklidir.
Kimlik doğrulama gerektirir
Parametreler
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
telefon |
string | Zorunlu | Alıcı telefon numarası (+905XXXXXXXXX) |
mesaj |
string | Zorunlu | Gönderilecek mesaj metni |
isim |
string | Opsiyonel | Alıcı adı (log için) |
tur_id |
integer | Opsiyonel | Gönderim türü ID (varsayılan: 10=genel) |
Request Body
{
"telefon": "+905321234567",
"mesaj": "Hello, your invoice is ready.",
"isim": "John",
"tur_id": 1
}
Response
200
{
"ok": true,
"log_id": 42,
"message_id": "BAE5F4A1C..."
}
POST
/api/v1/whatsapp/toplu-gonder
Toplu Mesaj Gönder
Birden fazla numaraya WhatsApp mesajı gönderir. Ban önleme aralıklı gönderim yapar.
Kimlik doğrulama gerektirir
Parametreler
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
alicilar |
array | Zorunlu | Alıcı listesi [{telefon, isim}] |
mesaj |
string | Zorunlu | Gönderilecek mesaj metni |
tur_id |
integer | Opsiyonel | Gönderim türü ID (varsayılan: 10=genel) |
Request Body
{
"alicilar": [
{
"telefon": "+905321234567",
"isim": "Ali"
},
{
"telefon": "+905339876543",
"isim": "Veli"
}
],
"mesaj": "Balance reminder",
"tur_id": 5
}
Response
200
{
"ok": true,
"total": 2,
"sent": 2,
"failed": 0
}
POST
/api/v1/whatsapp/dosya-gonder
Dosya Gönder
WhatsApp üzerinden PDF veya görsel gönderir.
Kimlik doğrulama gerektirir
Parametreler
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
telefon |
string | Zorunlu | Alıcı telefon numarası (+905XXXXXXXXX) |
dosya_yolu |
string | Zorunlu | Sunucudaki dosya yolu |
mesaj |
string | Opsiyonel | Dosya açıklaması |
Request Body
{
"telefon": "+905321234567",
"dosya_yolu": "\/faturalar\/FTR-001.pdf",
"mesaj": "Invoice attached"
}
Response
200
{
"ok": true,
"log_id": 43,
"message_id": "CAE7B2D..."
}
GET
/api/v1/whatsapp/hesaplar
Hesap Listesi
Tanımlı WhatsApp hesaplarını ve bağlantı durumlarını listeler.
Kimlik doğrulama gerektirir
Response
200
{
"ok": true,
"data": [
{
"id": 1,
"isim": "Main Account",
"telefon": "+905551234567",
"durum": "connected",
"varsayilan": true
}
]
}
GET
/api/v1/whatsapp/durum/{logId}
Gönderim Durumu
Belirtilen log kaydının gönderim durumunu sorgular.
Kimlik doğrulama gerektirir
Parametreler
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
logId |
integer | Zorunlu | Log kayıt ID |
Response
200
{
"ok": true,
"data": {
"id": 42,
"durum": "delivered",
"alici": "+905321234567",
"gonderim_zamani": "2026-02-23 14:30:00"
}
}
cURL Örneği
POST /api/v1/whatsapp/gonder
curl -X POST https://api.pratikesnaf.com/api/v1/whatsapp/gonder \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"telefon": "+905321234567", "mesaj": "Hello, your invoice is ready.", "isim": "John", "tur_id": 1}'