Lewati ke konten utama

Messaging API

Auto-Generated

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​

FieldTipeWajibDeskripsi
numberIdstring✅-
tostring✅-
textstring✅-

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​

FieldTipeWajibDeskripsi
numberIdstring✅-
tostring✅-
typestring (image, document, audio, video)✅-
mediaUrlstring✅-
captionstring❌-
filenamestring❌-

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​

FieldTipeWajibDeskripsi
numberIdstring✅-
tostring✅-
templateNamestring✅-
templateLanguagestring✅-
componentsarray❌-

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​

FieldTipeWajibDeskripsi
numberIdstring✅-
tostring✅-
bodystring✅-
interactiveTypestring (button, list)✅-
headerstring❌-
footerstring❌-
mediaUrlstring❌-
buttonsobject[]❌-
sectionsobject[]❌-
buttonTextstring❌-

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​

FieldTipeWajibDeskripsi
namestring❌-
numberIdstring✅-
recipientsstring[]✅-
typestring (text, template, image, interactive)✅-
textstring❌-
headerTextstring❌-
footerTextstring❌-
templateNamestring❌-
templateLanguagestring❌-
templateComponentsarray❌-
componentsarray❌-
templateVariableValuesobject❌-
mediaUrlstring❌-
mediaCaptionstring❌-
interactiveobject❌-
scheduledAtstring❌-
smartTimingboolean❌-
delayPerMessagenumber❌-

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​

NamaLokasiTipeWajibDeskripsi
pagequerystring❌-
limitquerystring❌-
statusquerystring❌-

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​

FieldTipeWajibDeskripsi
phonesstring[]✅-
formatstring (csv, json, txt)❌-
numberIdstring❌-
dateFromstring❌-
dateTostring❌-
timezonestring❌-

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​

NamaLokasiTipeWajibDeskripsi
idpathstring✅-

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​

NamaLokasiTipeWajibDeskripsi
mediaIdpathstring✅-
numberIdquerystring❌-

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