Cancel a message you have scheduled to be sent in the future.


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

idMessage IDYES


Example


curl https://api.transmitsms.com/cancel-sms.json \
  -u 2e24c1cbdd987221e165d543f34b84bf:secret \
  -d id=48782


JSON Response

{
  success: "OK",
  error: {
    code: "SUCCESS",
    description: "OK"
  }
}

XML Response

<?xmlversion="1.0"encoding="UTF-8"?>
<response>
  <success>OK</success>
  <error>
    <code>SUCCESS</code>
    <description>BFFs</decscription>
  </error>
</response>


PHP Examples


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