Skip to content
Home » Octopush Gateway SMS API » Webhook SMS Inbounds

Webhook SMS Inbounds

This webhook will be called by Octopush on the fly, each time an incoming SMS is received in one of your virtual numbers, or following the sending of a campaign (if the parameters allow it)

Query Fields

NameTypeDescription
message_id stringOriginal message ticket (if it’s found)
number stringMobile number
text stringIncoming message text
sim_card_number stringNumber of the Sim card that received the incoming message
reception_date stringDate of receipt of the incoming message, in “Y-m-d H:i:s” format

Simple PHP sample for data recovery

$content = json_decode($response); 

echo $content['message_id']; // sms_5fa275dbf21dc 
echo $content['number']; // +44600000000 
echo $content['text']; // some reply 
echo $content['sim_card_number']; // 12345 
echo $content['reception_date']; // 2020-11-04 11:11:45

Example of reception by email

Subject :
    You have received (1) SMS on Octopush               
Body : 
    Sender's number: +44600000000
    SMS text: Reply text.
    Target Number: 12345
    Ticket of the SMS you sent: sms_5fa275dbf21dc
    Text of the SMS you sent: Hello, can you answer?