Latest Broadcast
Use this api to get latest broadcast today.
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
. To get the latest broadcast, make a POST
call to /broadcasts/latest
Parameters
This is the main parameter used in get latest broadcast requests:
Name | Description |
---|---|
to | Required Here are some examples of supported phone number formats:
|
Example
Sample 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 successful and there is a new broadcast today:
{ "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 successful but there is no new broadcast today:
{ "data": { "hasBroadcast": false, "message_id": null, "content": [] } }