Latest Broadcast
Gunakan api ini untuk mengambil broadcast terbaru hari ini.
Prerequisite
All API calls require authentication with
API_TOKEN Developers can authenticate their API calls with the API_TOKEN generated in App Dashboard > Phone Numbers > Detail > Api. mengambil broadcast terbaru, lakukan panggilan POST ke /broadcasts/latest
Parameters
Ini adalah parameter utama yang digunakan untuk mengambil broadcast terbaru:
| Name | Description |
|---|---|
to | Required Berikut beberapa contoh format nomor telepon yang didukung:
|
Contoh
Sampel request
curl -X POST 'https://waofficial-rm.botika.online/api/whatsapp/v1/broadcasts/latest' \ -H 'Authorization: Bearer {{ API_TOKEN }}' \ -H 'Content-Type: application/json' \ -d '{ "to": "+62821xxxxxx" }'
Response berhasil dan terdapat broadcast terbaru hari ini:
{
"data": {
"hasBroadcast": true,
"message_id": {{ MESSAGE_ID }},
"content": {
"from": "broadcast",
"type": "template",
"content": {{ MESSAGE_CONTENT }}
},
"message_created_at": {{ MESSAGE_CREATED_AT }},
"latest_status": {{ MESSAGE_LATEST_STATUS }}
}
}Response berhasil tapi tidak terdapat broadcast terbaru hari ini:
{
"data": {
"hasBroadcast": false,
"message_id": null,
"content": []
}
}