WhatsApp Gateway
untuk Enterprise
API WhatsApp Gateway enterprise-grade dengan performa tinggi, skalabilitas, dan keamanan. Dibangun dengan Go dan Whatsmeow.
curl -X POST https://zendgo.app/api/messages/text \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"session_id": "session_123",
"recipient": "6281234567890",
"message": "Hello from ZendGo!"
}'
Cara Kerja
1. Buat Session
Hubungkan nomor WhatsApp Anda melalui API session dengan pairing code
2. Kirim Pesan
Gunakan API endpoint untuk mengirim berbagai jenis pesan
3. Terima Delivery Report
Pantau status pengiriman pesan melalui webhook atau message history
API Reference
https://zendgo.app/api
X-API-Key: your_api_key
🔑 Cara Mendapatkan API Key
Untuk menggunakan API ZendGo, Anda perlu mendaftar terlebih dahulu di zendgo.app menggunakan akun Google Anda.
- 1 Kunjungi zendgo.app
- 2 Klik tombol "Login dengan Google"
- 3 Setelah login, buka dashboard untuk membuat API Key
-
4
Salin API Key dan gunakan di header
X-API-Key
/api/sessions
Buat session WhatsApp baru
{
"phone_number": "6281234567890"
}
/api/sessions/:id/pair
Generate pairing code untuk connect WhatsApp
/api/sessions
List semua session yang aktif
/api/messages/text
Kirim pesan teks
{
"session_id": "session_123",
"recipient": "6281234567890",
"message": "Hello World!"
}
/api/messages/image
Kirim pesan gambar dengan caption
/api/messages/history
Lihat riwayat pesan
/api/sessions/:id/webhooks
Daftarkan webhook URL untuk session
/api/sessions/:id/webhooks/events
Lihat delivery log webhook
Message Types
Text Message
Pesan teks dengan footer otomatis
Image Message
Gambar dari URL + caption custom
Video Message
Video dari URL + caption custom
Document Message
Dokumen dari URL + filename custom
Audio Message
Audio dari URL
Location Message
Lokasi dengan lat/long + nama + alamat
Contact Message
Kontak dengan VCard
CTA Button
1-3 tombol interaktif (URL, call, quick reply, copy code)
List Message
Menu list dengan sections
Code Examples
# Kirim pesan teks
curl -X POST https://zendgo.app/api/messages/text \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"session_id": "session_123",
"recipient": "6281234567890",
"message": "Hello from ZendGo!"
}'
# Kirim gambar
curl -X POST https://zendgo.app/api/messages/image \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"session_id": "session_123",
"recipient": "6281234567890",
"image_url": "https://example.com/image.jpg",
"caption": "Check this out!"
}'
// Install: npm install axios
import axios from 'axios';
const API_KEY = 'your_api_key';
const BASE_URL = 'https://zendgo.app/api';
async function sendTextMessage(recipient, message) {
const response = await axios.post(
`${BASE_URL}/messages/text`,
{
session_id: 'session_123',
recipient: recipient,
message: message
},
{
headers: {
'X-API-Key': API_KEY,
'Content-Type': 'application/json'
}
}
);
return response.data;
}
// Usage
sendTextMessage('6281234567890', 'Hello from ZendGo!')
.then(console.log)
.catch(console.error);
# Install: pip install requests
import requests
API_KEY = 'your_api_key'
BASE_URL = 'https://zendgo.app/api'
def send_text_message(recipient, message):
headers = {
'X-API-Key': API_KEY,
'Content-Type': 'application/json'
}
data = {
'session_id': 'session_123',
'recipient': recipient,
'message': message
}
response = requests.post(
f'{BASE_URL}/messages/text',
headers=headers,
json=data
)
return response.json()
# Usage
result = send_text_message('6281234567890', 'Hello from ZendGo!')
print(result)
// Install: go get github.com/go-resty/resty/v2
package main
import (
"fmt"
"github.com/go-resty/resty/v2"
)
func sendTextMessage(recipient, message string) (map[string]interface{}, error) {
client := resty.New()
var result map[string]interface{}
_, err := client.R().
SetHeader("X-API-Key", "your_api_key").
SetHeader("Content-Type", "application/json").
SetBody(map[string]interface{}{
"session_id": "session_123",
"recipient": recipient,
"message": message,
}).
SetResult(&result).
Post("https://zendgo.app/api/messages/text")
return result, err
}
func main() {
result, err := sendTextMessage("6281234567890", "Hello from ZendGo!")
if err != nil {
panic(err)
}
fmt.Println(result)
}
FAQ & Troubleshooting
API Key dapat dibuat melalui endpoint POST /api/keys dengan admin authentication. Setelah dibuat, simpan API Key dengan aman karena hanya ditampilkan sekali.
Pairing Code adalah kode 8 karakter yang digunakan untuk menghubungkan WhatsApp ke ZendGo tanpa perlu scan QR code. Kode ini lebih praktis untuk deployment production.
Rate limit default adalah 100 request per jam per API Key. Limit ini dapat dikonfigurasi sesuai kebutuhan melalui environment variable RATE_LIMIT_COUNT dan RATE_LIMIT_WINDOW.
Anda dapat reconnect dengan membuat pairing code baru melalui endpoint POST /api/sessions/:id/pair. Pastikan koneksi internet stabil dan nomor WhatsApp masih aktif.
Ya, ZendGo menggunakan library Whatsmeow yang mendukung WhatsApp multi-device. Satu session dapat terhubung dengan satu nomor WhatsApp.