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/session.php

{
"brodcast_service":"whatsapp_credits",
"broadcast_message": "Service ID 100005 is registered.",
"contacts": "911234567890",
"buttons": "3",  //For 1 button, put the value 1 and use only "button1_value" attribute
"button1_value":"111",
"button2_value":"112",
"button3_value":"113"
}

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://wa20.nuke.co.in/v5/api/session.php' \
--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.",
"schedule_time": "12:46:31",
"contacts": "911234567890",
"buttons": "3",  
"button1_value":"111",
"button2_value":"112",
"button3_value":"113"
}'