Home › Documentation › API Reference › Send Text

Send Text

Kirim pesan teks ke nomor WhatsApp.

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

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 string required Isi pesan yang dikirim
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/text \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "device": "YOUR_DEVICE_ID", "phone": "628111111111", "message": "Hello dari API!" }'
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api.alatwa.com/send/text'); 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/text', { method: 'POST', headers: { 'Authorization': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "device": "YOUR_DEVICE_ID", "phone": "628111111111", "message": "Hello dari API!" }) });
import requests response = requests.post( 'https://api.alatwa.com/send/text', headers={ 'Authorization': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, json={ "device": "YOUR_DEVICE_ID", "phone": "628111111111", "message": "Hello dari API!" } )

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
Disconnect Device Send Text (GET)

Biar WhatsApp yang kerja, kamu fokus jualan

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

WhatsApp