Get the status about a message you have sent.


We created a new viewing experience for our SMS API documentation. It's now all in one central location. Click here to check it out!


Parameter

Description

Required

message_idMessage IDYES


Example


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


JSON Response

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

XML Response

<?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}';
}