Get detailed information about a response number you have leased.


Parameter



Description



Required


numberThe virtual number to retrieveYES


 


Example


curl https://api.transmitsms.com/get-number.json \
  -u 2e24c1cbdd987221e165d543f34b84bf:secret \
  -d number=61414000009

JSON Response



XML Response



{
    number: "61414000009", next_charge: "2013-08-14", auto_renew: true, price: "29", status: "active", forward_url: "http://example.com/sms" }


<?xmlversion="1.0"encoding="UTF-8"?>
<response>
  <number>61414000009</number> <next_charge>2013-08-14</next_charge> <auto_renew>true</auto_renew> <status>active</status> <price>29</status> <forward_url>http://example.com/sms</forward_url> </response>


 


PHP Examples


<?php
 include'../../APIClient2.php';
 $api=new transmitsmsAPI("API_KEY",'API_SECRET');
 
 $result=$api->getNumber('6140000000');
 if($result->error->code=='SUCCESS')
 {
     echo"This number is {$result->status} and valid up to {$result->next_charge}";
 }
 else
 {
     echo"Error: {$result->error->description}";
 }