Gateway Reference API
The Rumah Coding Gateway API framework delegates endpoints to control and orchestrate the underlying headless nodes. Organized through standard RESTful methodology utilizing JSON structural inputs, the system ensures programmatic routing of WhatsApp protocol integration cleanly devoid of state complexities.
Authentication Protocol
Endpoint authorization dictates a master API signature inside the header logic. Tokens strictly reside on your private panel infrastructure ensuring the secure linkage of outgoing requests.
apikey: YOUR_GLOBAL_TENANT_API_KEY
Content-Type: application/json
Binding Node Instance
Commands the engine container to allocate a fresh UUID session, yielding an executable WebSocket connection ready to transmit authorization frames (QR code).
| JSON Key | Definitions |
|---|---|
instanceName Required |
Unique deterministic node name. Alphabets or underscored permitted. |
qrcode |
Force returns a Base64-formatted QR schema string buffer output for clients to scan. Expected value: true. |
Dispatching Text Payload
Executes an atomic synchronous send operation targeting a distinct peer-to-peer or multiplex group network.
| JSON Pattern Payload | Description and Execution Constraint |
|---|---|
number Required |
Phone address node encoded strictly starting with numeric nation code representing the remote JID sequence (e.g. 6281...). Group broadcasts utilize the @g.us appendage indicator. |
options.delay |
Millisecond timing parameter mitigating API throttling constraints naturally. Generates typing state emulation prior to dispatch. |
textMessage.text Required |
Unicode string variables encompassing the transmission packet. Compatible with WhatsApp specific markdown styling (asterisks, tildes). |
Dispatching Media Payload
Mengirim dokumen, gambar, atau PDF melalui instance yang sama dengan payload URL atau base64 sesuai konfigurasi node gateway.
Webhook Event Mapping
Webhook delivery mengirim perubahan status instance, pesan masuk, pesan terkirim, dan kegagalan queue ke endpoint tenant yang sudah didaftarkan.
| Event | Use Case |
|---|---|
connection.update |
Memantau QR, connecting, open, dan close untuk health dashboard. |
messages.upsert |
Menerima pesan inbound dan meneruskannya ke sistem CRM atau support. |
send.message.status |
Menyimpan status sent, failed, dan retry untuk audit campaign. |
Untuk dokumentasi endpoint enterprise lengkap, hubungi tim Rumah Coding atau masuk ke workspace Dashboard.