Get the status about a message you have sent.


Parameter



Description



Required


message_idMessage ID
YES


 


Example


curl https://api.transmitsms.com/get-sms-stats.json \
  -u 2e24c1cbdd987221e165d543f34b84bf:secret \
  -d message_id=48782

JSON Response



XML Response



stats: {
    total: 4,
    recipientCount: 4,
    delivered: 4,
    pending: 0,
    bounced: 0,
    responses: 0,
    opt-outs: 0,
    link_hits: 0
}


<?xmlversion="1.0"encoding="UTF-8"?>
<response>
  <stats>
    <total>4</total>
    <recipientCount>4</recipientCount>
    <delivered>4</delivered>
    <pending>0</pending>
    <bounced>0</bounced>
    <responses>0</responses>
    <opt-outs>0</opt-outs>
    <link_hits>0</link_hits>
  </stats>
</response>

  


 


PHP Examples


<?php
 include'../../APIClient2.php';
 $api=new transmitsmsAPI("API_KEY",'API_SECRET');
 
 $result=$api->getSmsStats(49680);
 
 if($result->error->code=='SUCCESS')
 {
     print_r($result->stats);
 }
 else
 {
     echo"Error: {$result->error->description}";
 }