To Start sending "Session Messages", the first incoming message from the receiver is mandatory else "Ticket Expired" error will be displayed.

URL : https://{{url}}/v5/api/index.php/addbroadcast

{ 
"brodcast_service":"whatsapp_credits",
"broadcast_name" : "test_sep",
"contacts": "919589007600",
"uploaded_image1":"https://blddnt.com/a.jpg",
"attribute2":"1",   //Text Message 
"buttons": "3",
"button1_value":"111",
"button2_value":"112",
"button3_value":"113",
"call_title":"Call Now",
"call_number":"911234567890",
"url_title":"Visit",
"url_value":"https://stackflow.com"
}

Note:

  1. Max 3 buttons are allowed
  2. For 1 button, put the value 1 and use only the "button1_value" attribute, similarly for 2 buttons, put the value 2 and use 2 button attributes.
1353

📘

Sample Reponse

{"status":"ok","textsent":"ok","message":"{"contacts":[{"input":"911234567890","wa_id":"918878588599"}],"messages":[{"id":"gBEGkYh4WIWZAgn9BNpxW7cQiUk"}],"meta":{"api_status":"stable","version":"2.41.2"}}"}

curl --location --request POST 'http://182.70.241.4/v5/api/index.php/addbroadcast' \
--header 'Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2Mzc5MTMwODMsImlzcyI6ImxvY2FsaG9zdCIsImV4cCI6MTYzNzkxMzE0MywiZGF0YSI6eyJpZCI6IjkwIiwibmFtZSI6IkJpbGxDbG91ZCIsIm1vYmlsZSI6Iis5MTc4Nzg2MzA5MDQiLCJlbWFpbCI6Imt1bWFyQGJpbGxjbG91ZC5pbiJ9fQ._8QrQsy6w97ssh3EL_6KVwNyYcQVW_0cqREiIa-pbRI' \
--header 'Content-Type: application/json' \
--data-raw '{
"brodcast_service":"whatsapp_credits",
"template_id" : "session_message",
"broadcast_message": "Service ID 100005 is registered.",
"uploaded_image1":"https://blddnt.com/a.jpg",
"attribute2":"1",
"contacts": "911234567890",
"buttons": "3",  
"button1_value":"111",
"button2_value":"112",
"button3_value":"113",
"call_title":"Call Now",
"call_number":"911234567890",
"url_title":"Visit",
"url_value":"https://stackflow.com",
"footer": "text footer"
}'