Latest Broadcast

Gunakan api ini untuk mengambil broadcast terbaru hari ini.

mengambil broadcast terbaru, lakukan panggilan POST ke /broadcasts/latest

Parameters

Ini adalah parameter utama yang digunakan untuk mengambil broadcast terbaru:

NameDescription

to

Required

Berikut beberapa contoh format nomor telepon yang didukung:

  • +1-000-000-0000
  • +1 (000) 000-0000
  • +1 000 000 0000
  • +1 (000) 000 0000

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": []
    }
}

Copyright © 2023 Botika Teknologi Indonesia