Format and validate a given number.

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!




msisdnThe number to checkYES
countrycode2 Letter countrycode to validate number againstYES

countrycode values: AU = Australia, SG = Singapore, GB = United Kingdom, NZ = New Zealand, US = United States


curl \
  -u 2e24c1cbdd987221e165d543f34b84bf:secret \
  -d 'msisdn=0455667889' \
  -d 'countrycode=AU'

JSON Response

  "error": {
    "code": "SUCCESS",
    "description": "OK"
  "number": {
    "countrycode": 61,
     "international": 61455667889,
     "isValid": true,
     "national_leading_zeroes": 455667889,
     "nationalnumber": 455667889,
     "rawinput": null,
     "type": 1

XML Response

<?xml version="1.0" encoding="UTF-8"?>
      <rawinput />

PHP Examples

 include '../../APIClient2.php';

 $api = new transmitsmsAPI('API_KEY', 'API_SECRET');
 $result = $api->formatNumber('0455667889', 'AU');

 if ($result->error->code == 'SUCCESS') {
   echo 'Number valid and in international: {$result->number->international}';

 } else {
   echo 'Error: {$result->error->description}';