Home › Documentation › API Reference › Send Button

Send Button

Kirim pesan dengan tombol interaktif ke nomor WhatsApp.

POST https://api.alatwa.com/send/button

Headers

NameTypeDescription
Authorization string required API Key akun Alat WA Anda
Content-Type string required application/json

Body Parameters

NameTypeDescription
device string required Device ID akun Alat WA
phone string required Nomor WhatsApp penerima
message_header string required Header pesan
message string required Isi pesan utama
message_footer string required Footer pesan
buttons array required Array berisi label tombol (string)
schedule string optional Jadwal pengiriman (format: Y-m-d H:i:s)

Try It

Body Parameters

Code Examples

curl -X POST https://api.alatwa.com/send/button \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "device": "YOUR_DEVICE_ID", "phone": "628111111111", "message_header": "Header", "message": "Pilih salah satu:", "message_footer": "Footer", "buttons": [ "Opsi 1", "Opsi 2", "Opsi 3" ] }'
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api.alatwa.com/send/button'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: YOUR_API_KEY', 'Content-Type: application/json' ]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch);
const response = await fetch('https://api.alatwa.com/send/button', { method: 'POST', headers: { 'Authorization': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "device": "YOUR_DEVICE_ID", "phone": "628111111111", "message_header": "Header", "message": "Pilih salah satu:", "message_footer": "Footer", "buttons": [ "Opsi 1", "Opsi 2", "Opsi 3" ] }) });
import requests response = requests.post( 'https://api.alatwa.com/send/button', headers={ 'Authorization': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, json={ "device": "YOUR_DEVICE_ID", "phone": "628111111111", "message_header": "Header", "message": "Pilih salah satu:", "message_footer": "Footer", "buttons": [ "Opsi 1", "Opsi 2", "Opsi 3" ] } )

Response

200 Success
{ "status": "ok", "message_id": "3EB07186F0298BF9E5E8", "from": "628122222222", "to": "628111111111", "message": "Success" }

Response Fields

FieldTypeDescription
status string "ok" atau "error"
message_id string Unique message ID
from string Nomor WA pengirim
to string Nomor WA penerima
message string Pesan status
Send Media Create Broadcast

Biar WhatsApp yang kerja, kamu fokus jualan

Tanpa server, tanpa coding. Daftar, scan QR WhatsApp, dan auto reply pertamamu bisa langsung jalan.

WhatsApp