Semua endpoint REST + JSON. Base URL: https://openwa.click. Auth: x-api-key: owa_… header (lihat /panduan).
Kelola koneksi WhatsApp per session. Session = 1 nomor WA.
/api/sessionsList sessionsAmbil daftar semua session dan statusnya (open / connecting / disconnected).
curl -X GET https://openwa.click/api/sessions \ -H "x-api-key: owa_YOUR_KEY"
/api/sessionsCreate sessionBuat session baru (butuh scan QR berikutnya).
{ "id": "marketing" }curl -X POST https://openwa.click/api/sessions \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "id": "marketing" }'/api/sessionsLogout sessionHapus session + auth data.
{ "id": "marketing" }curl -X DELETE https://openwa.click/api/sessions \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "id": "marketing" }'/api/status?session=mainStatusStatus session sekarang + apakah QR tersedia.
curl -X GET https://openwa.click/api/status"?session=main" \ -H "x-api-key: owa_YOUR_KEY"
/api/qr?session=mainQR PNGPNG QR code (scan via WA → Linked Devices). 404 kalau belum tersedia atau sudah connected.
curl -X GET https://openwa.click/api/qr"?session=main" \ -H "x-api-key: owa_YOUR_KEY"
Kirim text, media, atau mention grup.
/api/sendKirim text (atau mention grup)Untuk kontak atau grup. Mentions: array phone, atau ['all'] untuk @semua di grup.
{
"session": "main",
"to": "628123456789",
"message": "Halo dari OpenWA",
"mentions": ["all"]
}{ "ok": true, "id": "<message_id>", "session": "main" }curl -X POST https://openwa.click/api/send \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "session": "main", "to": "628123456789", "message": "Halo dari OpenWA", "mentions": ["all"]
}'/api/send/mediaKirim mediaKind: image / video / document / audio / sticker. Source: url ATAU base64. Gambar auto-kompres; sticker auto-WebP 512×512.
{
"session": "main",
"to": "628123456789",
"kind": "image",
"url": "https://example.com/photo.jpg",
"caption": "Promo hari ini",
"compress": true
}curl -X POST https://openwa.click/api/send/media \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "session": "main", "to": "628123456789", "kind": "image", "url": "https://example.com/photo.jpg", "caption": "Promo hari ini", "compress": true
}'/api/status/postPost Status WhatsAppKirim status text (story) ke status@broadcast.
{ "session": "main", "text": "Lagi promo!", "backgroundColor": "#10b981" }curl -X POST https://openwa.click/api/status/post \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "session": "main", "text": "Lagi promo!", "backgroundColor": "#10b981" }'/api/groups?session=mainList grupDaftar grup yang diikuti session ini. Pakai .id sebagai to= di /api/send.
curl -X GET https://openwa.click/api/groups"?session=main" \ -H "x-api-key: owa_YOUR_KEY"
Broadcast massal dengan antrian, jadwal, dan template {{var}}.
/api/templatesCreate templateBuat template pesan dengan placeholder {{nama}}.
{ "session": "main", "name": "greeting", "body": "Halo {{nama}}, terima kasih order {{produk}}!" }curl -X POST https://openwa.click/api/templates \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "session": "main", "name": "greeting", "body": "Halo {{nama}}, terima kasih order {{produk}}!" }'/api/templates?session=mainList templatesAmbil semua template untuk session.
curl -X GET https://openwa.click/api/templates"?session=main" \ -H "x-api-key: owa_YOUR_KEY"
/api/templates/[id]Update templateUpdate nama/body.
{ "name": "new-name", "body": "..." }curl -X PUT https://openwa.click/api/templates/[id] \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "new-name", "body": "..." }'/api/templates/[id]Delete templateHapus template.
curl -X DELETE https://openwa.click/api/templates/[id] \ -H "x-api-key: owa_YOUR_KEY"
/api/broadcastQueue broadcastJadwalkan broadcast. Worker jalan tiap 5s, jeda acak 3–12s antar kirim, cap 300/hari/nomor.
{
"session": "main",
"name": "promo oktober",
"templateId": "tpl_xxx",
"scheduledAt": "2026-04-21T09:00:00Z",
"recipients": [
{ "phone": "628111", "vars": { "nama": "Budi", "produk": "Batik" } }
]
}curl -X POST https://openwa.click/api/broadcast \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "session": "main", "name": "promo oktober", "templateId": "tpl_xxx", "scheduledAt": "2026-04-21T09:00:00Z", "recipients": [ { "phone": "628111", "vars": { "nama": "Budi", "produk": "Batik" } } ]
}'/api/broadcast?session=mainList broadcastsProgress: status, sent, failed, total.
curl -X GET https://openwa.click/api/broadcast"?session=main" \ -H "x-api-key: owa_YOUR_KEY"
/api/broadcast/[id]Broadcast detailDetail 1 broadcast.
curl -X GET https://openwa.click/api/broadcast/[id] \ -H "x-api-key: owa_YOUR_KEY"
/api/broadcast/[id]Cancel broadcastBatalkan broadcast pending/running.
curl -X DELETE https://openwa.click/api/broadcast/[id] \ -H "x-api-key: owa_YOUR_KEY"
Terima event inbound (pesan masuk, ack, edited, deleted, call, group).
/api/webhookSet/update webhookSet URL penerima event. Event: message, message.edited, message.deleted, message.ack, call.offer, group.update. Kosongkan events untuk forward semua.
{
"session": "main",
"url": "https://your-server.com/hook",
"secret": "s3cr3t",
"events": "message,message.ack"
}curl -X PUT https://openwa.click/api/webhook \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "session": "main", "url": "https://your-server.com/hook", "secret": "s3cr3t", "events": "message,message.ack"
}'/api/webhook?session=mainGet webhook + deliveriesConfig webhook sekarang + 20 delivery terakhir.
curl -X GET https://openwa.click/api/webhook"?session=main" \ -H "x-api-key: owa_YOUR_KEY"
/api/webhook?session=mainRemove webhookMatikan webhook.
curl -X DELETE https://openwa.click/api/webhook \ -H "x-api-key: owa_YOUR_KEY"
Balas pesan masuk otomatis pakai XessOne AI (Claude Haiku 4.5).
/api/configAktifkan AI + system promptautoReplyAI toggle + systemPrompt untuk karakter AI. replyGroups untuk aktifkan di grup juga.
{
"session": "main",
"autoReplyAI": true,
"replyGroups": false,
"systemPrompt": "Kamu CS toko batik. Balas ramah, max 2 kalimat, Bahasa Indonesia."
}curl -X PUT https://openwa.click/api/config \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "session": "main", "autoReplyAI": true, "replyGroups": false, "systemPrompt": "Kamu CS toko batik. Balas ramah, max 2 kalimat, Bahasa Indonesia."
}'/api/config?session=mainGet configAmbil config session (flag auto-reply, auto-mark-read, auto-reject-call).
curl -X GET https://openwa.click/api/config"?session=main" \ -H "x-api-key: owa_YOUR_KEY"
/api/ai/testTest AI gatewayPing XessOne AI tanpa kirim ke WA.
{ "prompt": "Halo", "system": "Balas singkat." }curl -X POST https://openwa.click/api/ai/test \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "prompt": "Halo", "system": "Balas singkat." }'Toggle auto-mark-read + auto-reject-call.
/api/configSet auto behaviorsToggle fitur perilaku session.
{ "session": "main", "autoMarkRead": true, "autoRejectCall": true }curl -X PUT https://openwa.click/api/config \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "session": "main", "autoMarkRead": true, "autoRejectCall": true }'Issue key per tim dengan scope & session pinning. Dibutuhkan scope 'admin'.
/api/keysList keys (admin)Preview 6 char terakhir, counter usage, revoke status.
curl -X GET https://openwa.click/api/keys \ -H "x-api-key: owa_YOUR_KEY"
/api/keysCreate key (admin)Key plaintext hanya dikembalikan SEKALI. Scope: admin, send, broadcast, config, ai, media, webhook.
{ "name": "tim marketing", "scopes": ["send"], "sessionId": "marketing" }curl -X POST https://openwa.click/api/keys \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "tim marketing", "scopes": ["send"], "sessionId": "marketing" }'/api/keys/[id]Revoke key (admin)Soft-delete (set revoked_at).
curl -X DELETE https://openwa.click/api/keys/[id] \ -H "x-api-key: owa_YOUR_KEY"
Model Context Protocol untuk AI agent (Claude Desktop, Cursor, custom). 9 tools terdaftar.
/api/mcpMCP discoveryInfo server + daftar tool (tanpa auth, read-only).
curl -X GET https://openwa.click/api/mcp \ -H "x-api-key: owa_YOUR_KEY"
/api/mcpJSON-RPC 2.0 endpointMethod: initialize, tools/list, tools/call. Transport: Streamable HTTP.
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": { "name": "wa_send_text",
"arguments": { "session": "main", "to": "628111", "message": "Halo" } } }curl -X POST https://openwa.click/api/mcp \
-H "x-api-key: owa_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "wa_send_text", "arguments": { "session": "main", "to": "628111", "message": "Halo" } } }'