Messaging API
Halaman ini di-generate otomatis dari OpenAPI spec backend Wavio. Terakhir diperbarui: 2026-11-03
🔵 POST /messages/send
Kirim Pesan Teks
Kirim pesan teks biasa ke satu nomor tujuan.
Request Body
| Field | Tipe | Wajib | Deskripsi |
|---|---|---|---|
numberId | string | ✅ | - |
to | string | ✅ | - |
text | string | ✅ | - |
Contoh Request Body
{
"numberId": "MASUKKAN_ID_WABA_DI_SINI",
"to": "+6281234567890",
"text": "Halo dari Wavio API!"
}
Contoh cURL
curl -X POST "https://api.wavio.id/api/v1/public/messages/send" \
-H "X-API-Key: wavio_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"numberId": "MASUKKAN_ID_WABA_DI_SINI",
"to": "+6281234567890",
"text": "Halo dari Wavio API!"
}'
Response 200
Success
{
"success": true,
"message": "Operation successful",
"data": { ... }
}
🔵 POST /messages/send-media
Kirim Pesan Media
Kirim pesan gambar, dokumen, audio, atau video.
Request Body
| Field | Tipe | Wajib | Deskripsi |
|---|---|---|---|
numberId | string | ✅ | - |
to | string | ✅ | - |
type | string (image, document, audio, video) | ✅ | - |
mediaUrl | string | ✅ | - |
caption | string | ❌ | - |
filename | string | ❌ | - |
Contoh Request Body
{
"numberId": "MASUKKAN_ID_WABA_DI_SINI",
"to": "+6281234567890",
"type": "image",
"mediaUrl": "https://example.com/image.jpg",
"caption": "Foto terbaru"
}
Contoh cURL
curl -X POST "https://api.wavio.id/api/v1/public/messages/send-media" \
-H "X-API-Key: wavio_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"numberId": "MASUKKAN_ID_WABA_DI_SINI",
"to": "+6281234567890",
"type": "image",
"mediaUrl": "https://example.com/image.jpg",
"caption": "Foto terbaru"
}'
Response 200
Success
{
"success": true,
"message": "Operation successful",
"data": { ... }
}
🔵 POST /messages/send-template
Kirim Pesan Template
Kirim pesan menggunakan template WhatsApp yang sudah diapprove. Anda bisa mengirimkan variabel dinamis (teks, media, tombol) melalui field components dengan format standar API Meta.
Request Body
| Field | Tipe | Wajib | Deskripsi |
|---|---|---|---|
numberId | string | ✅ | - |
to | string | ✅ | - |
templateName | string | ✅ | - |
templateLanguage | string | ✅ | - |
components | array | ❌ | - |
Contoh Request Body
{
"numberId": "MASUKKAN_ID_WABA_DI_SINI",
"to": "+6281234567890",
"templateName": "hello_world",
"templateLanguage": "en_US",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Budi"
},
{
"type": "text",
"text": "INV-12345"
}
]
}
]
}
Contoh cURL
curl -X POST "https://api.wavio.id/api/v1/public/messages/send-template" \
-H "X-API-Key: wavio_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"numberId": "MASUKKAN_ID_WABA_DI_SINI",
"to": "+6281234567890",
"templateName": "hello_world",
"templateLanguage": "en_US",
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "Budi"
},
{
"type": "text",
"text": "INV-12345"
}
]
}
]
}'
Response 200
Success
{
"success": true,
"message": "Operation successful",
"data": { ... }
}
🔵 POST /messages/send-interactive
Kirim Pesan Interaktif
Kirim pesan interaktif dengan tombol atau list.
Request Body
| Field | Tipe | Wajib | Deskripsi |
|---|---|---|---|
numberId | string | ✅ | - |
to | string | ✅ | - |
body | string | ✅ | - |
interactiveType | string (button, list) | ✅ | - |
header | string | ❌ | - |
footer | string | ❌ | - |
mediaUrl | string | ❌ | - |
buttons | object[] | ❌ | - |
sections | object[] | ❌ | - |
buttonText | string | ❌ | - |
Contoh Request Body
{
"numberId": "MASUKKAN_ID_WABA_DI_SINI",
"to": "+6281234567890",
"interactiveType": "button",
"body": "Silakan pilih opsi di bawah",
"buttons": [
{
"id": "btn_1",
"title": "Opsi 1"
}
]
}
Contoh cURL
curl -X POST "https://api.wavio.id/api/v1/public/messages/send-interactive" \
-H "X-API-Key: wavio_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"numberId": "MASUKKAN_ID_WABA_DI_SINI",
"to": "+6281234567890",
"interactiveType": "button",
"body": "Silakan pilih opsi di bawah",
"buttons": [
{
"id": "btn_1",
"title": "Opsi 1"
}
]
}'
Response 200
Success
🔵 POST /messages/broadcast
Kirim Broadcast
Kirim broadcast dengan dukungan tipe pesan dashboard (text, template, image, interactive), penjadwalan, Smart "Perfect Timing", dan jeda antar penerima.
Request Body
| Field | Tipe | Wajib | Deskripsi |
|---|---|---|---|
name | string | ❌ | - |
numberId | string | ✅ | - |
recipients | string[] | ✅ | - |
type | string (text, template, image, interactive) | ✅ | - |
text | string | ❌ | - |
headerText | string | ❌ | - |
footerText | string | ❌ | - |
templateName | string | ❌ | - |
templateLanguage | string | ❌ | - |
templateComponents | array | ❌ | - |
components | array | ❌ | - |
templateVariableValues | object | ❌ | - |
mediaUrl | string | ❌ | - |
mediaCaption | string | ❌ | - |
interactive | object | ❌ | - |
scheduledAt | string | ❌ | - |
smartTiming | boolean | ❌ | - |
delayPerMessage | number | ❌ | - |
Contoh Request Body
{
"numberId": "MASUKKAN_ID_WABA_DI_SINI",
"recipients": [
"+6281234567890",
"+6280987654321"
],
"type": "text",
"text": "Pengumuman penting!",
"delayPerMessage": 5,
"scheduledAt": "2026-08-20T10:00:00.000Z",
"smartTiming": false
}
Contoh cURL
curl -X POST "https://api.wavio.id/api/v1/public/messages/broadcast" \
-H "X-API-Key: wavio_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"numberId": "MASUKKAN_ID_WABA_DI_SINI",
"recipients": [
"+6281234567890",
"+6280987654321"
],
"type": "text",
"text": "Pengumuman penting!",
"delayPerMessage": 5,
"scheduledAt": "2026-08-20T10:00:00.000Z",
"smartTiming": false
}'
Response 201
Broadcast queued
🟢 GET /messages
List Pesan
Melihat riwayat pesan keluar dan masuk.
Parameters
| Nama | Lokasi | Tipe | Wajib | Deskripsi |
|---|---|---|---|---|
page | query | string | ❌ | - |
limit | query | string | ❌ | - |
status | query | string | ❌ | - |
Contoh cURL
curl -X GET "https://api.wavio.id/api/v1/public/messages" \
-H "X-API-Key: wavio_YOUR_API_KEY" \
-H "Content-Type: application/json"
Response 200
Success
🔵 POST /messages/export
Export Chat per Nomor
Unduh seluruh riwayat chat untuk satu atau beberapa nomor WhatsApp pelanggan (maks. 100 nomor, 50.000 pesan per permintaan). Respons berupa berkas sesuai format: json (dikelompokkan per percakapan), csv (satu baris per pesan), atau txt (format mirip ekspor WhatsApp). Isi numberId untuk membatasi ke satu nomor WABA, dan dateFrom/dateTo untuk rentang waktu. Jumlah pesan tersedia di header X-Total-Messages.
Request Body
| Field | Tipe | Wajib | Deskripsi |
|---|---|---|---|
phones | string[] | ✅ | - |
format | string (csv, json, txt) | ❌ | - |
numberId | string | ❌ | - |
dateFrom | string | ❌ | - |
dateTo | string | ❌ | - |
timezone | string | ❌ | - |
Contoh Request Body
{
"phones": [
"+6281234567890",
"6289876543210"
],
"format": "csv",
"dateFrom": "2026-10-01T00:00:00+07:00",
"dateTo": "2026-10-31T23:59:59+07:00"
}
Contoh cURL
curl -X POST "https://api.wavio.id/api/v1/public/messages/export" \
-H "X-API-Key: wavio_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phones": [
"+6281234567890",
"6289876543210"
],
"format": "csv",
"dateFrom": "2026-10-01T00:00:00+07:00",
"dateTo": "2026-10-31T23:59:59+07:00"
}'
Response 200
Berkas export (application/json, text/csv, atau text/plain)
{
"success": true,
"message": "Operation successful",
"data": { ... }
}
Response 404
Tidak ada pesan untuk nomor tersebut
{
"success": true,
"message": "Operation successful",
"data": { ... }
}
Response 413
Melebihi batas 50.000 pesan, persempit rentang tanggal
{
"success": true,
"message": "Operation successful",
"data": { ... }
}
🟢 GET /messages/{id}
Detail Pesan
Melihat detail sebuah pesan berdasarkan ID.
Parameters
| Nama | Lokasi | Tipe | Wajib | Deskripsi |
|---|---|---|---|---|
id | path | string | ✅ | - |
Contoh cURL
curl -X GET "https://api.wavio.id/api/v1/public/messages/{id}" \
-H "X-API-Key: wavio_YOUR_API_KEY" \
-H "Content-Type: application/json"
Response 200
Success
🟢 GET /media/{mediaId}
Download/Proxy Media
Download file media (gambar, dokumen, audio, video) berdasarkan mediaId. Parameter numberId opsional jika pesan sudah tersimpan di sistem.
Parameters
| Nama | Lokasi | Tipe | Wajib | Deskripsi |
|---|---|---|---|---|
mediaId | path | string | ✅ | - |
numberId | query | string | ❌ | - |
Contoh cURL
curl -X GET "https://api.wavio.id/api/v1/public/media/{mediaId}" \
-H "X-API-Key: wavio_YOUR_API_KEY" \
-H "Content-Type: application/json"
Response 200
Binary stream data media