Bu doküman, WhatsApp API'sinin sunduğu endpoint'leri (servis noktalarını) ve işlevlerini basit bir dille açıklamaktadır.
Uygulamanın WhatsApp sunucularıyla olan temel bağlantı ve kimlik doğrulama işlemlerini yönetir.
GET /app/logincurl -X GET http://localhost:3000/app/login
GET /app/login-with-codephone (query): Ülke koduyla birlikte telefon numaranız (Örn: 905xxxxxxxxx).curl -X GET "http://localhost:3000/app/login-with-code?phone=905xxxxxxxxx"
GET /app/logoutcurl -X GET http://localhost:3000/app/logout
GET /app/reconnectcurl -X GET http://localhost:3000/app/reconnect
GET /app/devicescurl -X GET http://localhost:3000/app/devices
Kullanıcı bilgileri, profil ayarları ve kişi listesi gibi işlemleri yönetir.
GET /user/infophone (query): Bilgisi alınacak kullanıcının WhatsApp ID'si (Örn: 905xxxxxxxxx@s.whatsapp.net).curl -X GET "http://localhost:3000/user/info?phone=905xxxxxxxxx@s.whatsapp.net"
GET /user/avatarphone (query): Avatarı alınacak kullanıcının WhatsApp ID'si.is_preview (query, opsiyonel): true ise fotoğrafın küçük bir önizlemesini getirir.is_community (query, opsiyonel): true ise topluluk avatarını getirir.curl -X GET "http://localhost:3000/user/avatar?phone=905xxxxxxxxx@s.whatsapp.net&is_preview=true"
POST /user/avataravatar (form-data): Yüklenecek yeni profil fotoğrafı dosyası.curl -X POST http://localhost:3000/user/avatar \
-H "Content-Type: multipart/form-data" \
-F "avatar=@/path/to/your/image.jpg"
POST /user/pushnamepush_name (json): Ayarlamak istediğiniz yeni isim.curl -X POST http://localhost:3000/user/pushname \
-H "Content-Type: application/json" \
-d '{"push_name": "Yeni Isim"}'
GET /user/my/privacycurl -X GET http://localhost:3000/user/my/privacy
GET /user/my/groupscurl -X GET http://localhost:3000/user/my/groups
GET /user/my/newsletterscurl -X GET http://localhost:3000/user/my/newsletters
GET /user/my/contactscurl -X GET http://localhost:3000/user/my/contacts
GET /user/checkphone (query): Kontrol edilecek telefon numarası.curl -X GET "http://localhost:3000/user/check?phone=905xxxxxxxxx"
Farklı türlerde (metin, resim, video, dosya vb.) mesaj gönderme işlemlerini gerçekleştirir.
POST /send/messagephone (json): Mesajın gönderileceği alıcının WhatsApp ID'si.message (json): Gönderilecek metin içeriği.reply_message_id (json, opsiyonel): Yanıtlamak istediğiniz mesajın ID'si.is_forwarded (json, opsiyonel): Mesajın iletilmiş olarak işaretlenip işaretlenmeyeceği.curl -X POST http://localhost:3000/send/message \
-H "Content-Type: application/json" \
-d '{"phone": "905xxxxxxxxx@s.whatsapp.net","message": "Merhaba, bu bir test mesajıdır."}'
POST /send/imagephone (form-data): Alıcının WhatsApp ID'si.caption (form-data, opsiyonel): Resim altı yazısı.view_once (form-data, opsiyonel): true ise resim tek seferlik görüntülenir.image (form-data): Gönderilecek resim dosyası.image_url (form-data): Gönderilecek resmin URL'si.compress (form-data, opsiyonel): true ise resim sıkıştırılır.curl -X POST http://localhost:3000/send/image \
-H "Content-Type: multipart/form-data" \
-F "phone=905xxxxxxxxx@s.whatsapp.net" \
-F "caption=Resim altı yazısı" \
-F "image=@/path/to/your/image.jpg"
POST /send/audiophone (form-data): Alıcının WhatsApp ID'si.audio (form-data): Gönderilecek ses dosyası.audio_url (form-data): Gönderilecek ses dosyasının URL'si.curl -X POST http://localhost:3000/send/audio \
-H "Content-Type: multipart/form-data" \
-F "phone=905xxxxxxxxx@s.whatsapp.net" \
-F "audio=@/path/to/your/audio.ogg"
POST /send/filephone (form-data): Alıcının WhatsApp ID'si.caption (form-data, opsiyonel): Dosya altı yazısı.file (form-data): Gönderilecek dosya.curl -X POST http://localhost:3000/send/file \
-H "Content-Type: multipart/form-data" \
-F "phone=905xxxxxxxxx@s.whatsapp.net" \
-F "caption=Dosya açıklaması" \
-F "file=@/path/to/your/document.pdf"
POST /send/videophone (form-data): Alıcının WhatsApp ID'si.caption (form-data, opsiyonel): Video altı yazısı.view_once (form-data, opsiyonel): true ise video tek seferlik görüntülenir.video (form-data): Gönderilecek video dosyası.video_url (form-data): Gönderilecek videonun URL'si.curl -X POST http://localhost:3000/send/video \
-H "Content-Type: multipart/form-data" \
-F "phone=905xxxxxxxxx@s.whatsapp.net" \
-F "caption=Video açıklaması" \
-F "video=@/path/to/your/video.mp4"
POST /send/contactphone (json): Alıcının WhatsApp ID'si.contact_name (json): Gönderilecek kişinin adı.contact_phone (json): Gönderilecek kişinin telefon numarası.curl -X POST http://localhost:3000/send/contact \
-H "Content-Type: application/json" \
-d '{"phone": "905xxxxxxxxx@s.whatsapp.net","contact_name": "Ahmet Yılmaz","contact_phone": "905xxxxxxxxx"}'
POST /send/linkphone (json): Alıcının WhatsApp ID'si.link (json): Gönderilecek URL.caption (json, opsiyonel): Bağlantı açıklaması.curl -X POST http://localhost:3000/send/link \
-H "Content-Type: application/json" \
-d '{"phone": "905xxxxxxxxx@s.whatsapp.net","link": "https://www.google.com","caption": "Google\'a bir göz atın!"}'
POST /send/locationphone (json): Alıcının WhatsApp ID'si.latitude (json): Enlem koordinatı.longitude (json): Boylam koordinatı.curl -X POST http://localhost:3000/send/location \
-H "Content-Type: application/json" \
-d '{"phone": "905xxxxxxxxx@s.whatsapp.net","latitude": "41.0082","longitude": "28.9784"}'
POST /send/pollphone (json): Alıcının WhatsApp ID'si.question (json): Anket sorusu.options (json): Anket seçeneklerini içeren bir dizi (array).max_answer (json): Verilebilecek maksimum cevap sayısı.curl -X POST http://localhost:3000/send/poll \
-H "Content-Type: application/json" \
-d '{"phone": "905xxxxxxxxx@s.whatsapp.net","question": "En sevdiğiniz renk hangisi?","options": ["Mavi", "Yeşil", "Kırmızı"],"max_answer": 1}'
POST /send/presencetype (json): Durum tipi (available veya unavailable).curl -X POST http://localhost:3000/send/presence \
-H "Content-Type: application/json" \
-d '{"type": "available"}'
Gönderilmiş mesajlar üzerinde işlem yapmayı sağlar (silme, düzenleme, tepki verme vb.).
POST /message/{message_id}/revokemessage_id (path): Silinecek mesajın ID'si.phone (json): Mesajın gönderildiği sohbetin ID'si.curl -X POST http://localhost:3000/message/MESSAGE_ID/revoke \
-H "Content-Type: application/json" \
-d '{"phone": "905xxxxxxxxx@s.whatsapp.net"}'
POST /message/{message_id}/deletemessage_id (path): Silinecek mesajın ID'si.phone (json): Mesajın gönderildiği sohbetin ID'si.curl -X POST http://localhost:3000/message/MESSAGE_ID/delete \
-H "Content-Type: application/json" \
-d '{"phone": "905xxxxxxxxx@s.whatsapp.net"}'
POST /message/{message_id}/reactionmessage_id (path): Tepki verilecek mesajın ID'si.phone (json): Mesajın gönderildiği sohbetin ID'si.emoji (json): Gönderilecek emoji.curl -X POST http://localhost:3000/message/MESSAGE_id/reaction \
-H "Content-Type: application/json" \
-d '{"phone": "905xxxxxxxxx@s.whatsapp.net","emoji": "👍"}'
POST /message/{message_id}/updatemessage_id (path): Düzenlenecek mesajın ID'si.phone (json): Mesajın gönderildiği sohbetin ID'si.message (json): Mesajın yeni metni.curl -X POST http://localhost:3000/message/MESSAGE_ID/update \
-H "Content-Type: application/json" \
-d '{"phone": "905xxxxxxxxx@s.whatsapp.net","message": "Düzenlenmiş mesaj içeriği."}'
POST /message/{message_id}/readmessage_id (path): Okundu olarak işaretlenecek mesajın ID'si.phone (json): Mesajın gönderildiği sohbetin ID'si.curl -X POST http://localhost:3000/message/MESSAGE_ID/read \
-H "Content-Type: application/json" \
-d '{"phone": "905xxxxxxxxx@s.whatsapp.net"}'
POST /message/{message_id}/starmessage_id (path): Yıldızlanacak mesajın ID'si.phone (json): Mesajın gönderildiği sohbetin ID'si.curl -X POST http://localhost:3000/message/MESSAGE_ID/star \
-H "Content-Type: application/json" \
-d '{"phone": "905xxxxxxxxx@s.whatsapp.net"}'
POST /message/{message_id}/unstarmessage_id (path): Yıldızı kaldırılacak mesajın ID'si.phone (json): Mesajın gönderildiği sohbetin ID'si.curl -X POST http://localhost:3000/message/MESSAGE_ID/unstar \
-H "Content-Type: application/json" \
-d '{"phone": "905xxxxxxxxx@s.whatsapp.net"}'
WhatsApp gruplarını yönetmek için kullanılır (grup oluşturma, üye ekleme/çıkarma vb.).
POST /grouptitle (json): Grubun başlığı.participants (json): Gruba eklenecek üyelerin telefon numaralarını içeren dizi.curl -X POST http://localhost:3000/group \
-H "Content-Type: application/json" \
-d '{"title": "Yeni Grup","participants": ["905xxxxxxxxx", "905yyyyyyyyy"]}'
POST /group/participantsgroup_id (json): İşlem yapılacak grubun ID'si.participants (json): Eklenecek üyelerin telefon numaraları.curl -X POST http://localhost:3000/group/participants \
-H "Content-Type: application/json" \
-d '{"group_id": "GROUP_ID@g.us","participants": ["905zzzzzzzzz"]}'
POST /group/participants/removegroup_id (json): İşlem yapılacak grubun ID'si.participants (json): Çıkarılacak üyelerin telefon numaraları.curl -X POST http://localhost:3000/group/participants/remove \
-H "Content-Type: application/json" \
-d '{"group_id": "GROUP_ID@g.us","participants": ["905zzzzzzzzz"]}'
POST /group/participants/promotegroup_id (json): İşlem yapılacak grubun ID'si.participants (json): Yönetici yapılacak üyelerin telefon numaraları.curl -X POST http://localhost:3000/group/participants/promote \
-H "Content-Type: application/json" \
-d '{"group_id": "GROUP_ID@g.us","participants": ["905yyyyyyyyy"]}'
POST /group/participants/demotegroup_id (json): İşlem yapılacak grubun ID'si.participants (json): Yetkisi alınacak yöneticilerin telefon numaraları.curl -X POST http://localhost:3000/group/participants/demote \
-H "Content-Type: application/json" \
-d '{"group_id": "GROUP_ID@g.us","participants": ["905yyyyyyyyy"]}'
POST /group/join-with-linklink (json): Katılınacak grubun davet bağlantısı.curl -X POST http://localhost:3000/group/join-with-link \
-H "Content-Type: application/json" \
-d '{"link": "https://chat.whatsapp.com/INVITE_LINK"}'
GET /group/participant-requestsgroup_id (query): İstekleri listelenecek grubun ID'si.curl -X GET "http://localhost:3000/group/participant-requests?group_id=GROUP_ID@g.us"
POST /group/participant-requests/approvegroup_id (json): İşlem yapılacak grubun ID'si.participants (json): Katılma isteği onaylanacak kişilerin ID'leri.curl -X POST http://localhost:3000/group/participant-requests/approve \
-H "Content-Type: application/json" \
-d '{"group_id": "GROUP_ID@g.us","participants": ["905zzzzzzzzz"]}'
POST /group/participant-requests/rejectgroup_id (json): İşlem yapılacak grubun ID'si.participants (json): Katılma isteği reddedilecek kişilerin ID'leri.curl -X POST http://localhost:3000/group/participant-requests/reject \
-H "Content-Type: application/json" \
-d '{"group_id": "GROUP_ID@g.us","participants": ["905zzzzzzzzz"]}'
POST /group/leavegroup_id (json): Ayrılınacak grubun ID'si.curl -X POST http://localhost:3000/group/leave \
-H "Content-Type: application/json" \
-d '{"group_id": "GROUP_ID@g.us"}'
Haber bültenlerini yönetmek için kullanılır.
POST /newsletter/unfollownewsletter_id (json): Takipten çıkılacak haber bülteninin ID'si.curl -X POST http://localhost:3000/newsletter/unfollow \
-H "Content-Type: application/json" \
-d '{"newsletter_id": "NEWSLETTER_ID@newsletter"}'