API & DOCS

My Account            

API to search available tracking numbers

Use the Number Search API to search available tracking numbers

Use the Number Search API to search available tracking numbers within DialogTech's available inventory.

📘

Base URL for Number Search

https://secure.dialogtech.com/ibp_api.php

Parameter List

ParameterRequiredAcceptsMax LengthNotesUsage
actionYesString: numbers.searchn/aOnly accepts numbers.search to search numbersDefines the API Call as "Number Search" type
access_keyYesStringn/aAccess Key from the Key Manager within a DialogTech accountCredentials used for access to the API for a particular DialogTech account
secret_access_keyYesStringn/aSecret Access Key from the Key Manager within a DialogTech accountCredentials used for access to the API for a particular DialogTech account
typeYesString: local or tollfreen/alocal - Search for a local number
tollfree - Search for a toll free number
Defines the type of number being searched for
valueNo*area code, or area code + exchange6If searching by area code it must be 3 digits and for NpaNxx it must be 6 digits. Toll free numbers are not supported.Defines the pattern being searched for within inventory
quantityNoStringRange 0-50Default: 10Amount of phone numbers to return if available
sms_supportedNo0 or 110 - return any phone numbers matching search criteria, regardless of SMS support (default)

1 - return only phone numbers that can be enabled for SMS
Used to limit the phone number(s) returned to only those that support SMS.

Note that phone numbers must still be explicitly registered to receive SMS messages using the SMS APIs.

*Required when type=local

Using this API

These code examples are meant to show a basic method of accessing DialogTech's IVR Report API.

<?php
  /*
    Search Number EX:
    This example will search DialogTech's
    inventory for a local number matching
    the area code of 555.
  */

  // Create cURL resource
  $ch = curl_init(); 
  $baseuri = "https://secure.dialogtech.com/ibp_api.php?";

  // API Specific Static Parameters
  $action = "numbers.search";

  // Required User Parameters To Request the API
  $access_key = "foo";
  $secret_access_key = "bar";
  $type = "local";
  $value = "555";
  
  // Non required parameters used to request toe API
  $quantity = "3";



  // Construct the full URL
  $full_url = $baseuri . "&action=" . $action .
    "&access_key=" . $access_key .
    "&secret_access_key=" . $secret_access_key .
    "&type=" . $type .
    "&value=" . $value .
    "&quantity=" . $quantity;


  // Set the URL
  curl_setopt($ch, CURLOPT_URL, $full_url);

  // Sets the return options of the cURL to return the actual result from the curl request, and FALSE on failure
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

  // Sets the $output variable to the result of the curl
  $output = curl_exec($ch);

  // Close curl resource to free up system resources
  curl_close($ch);

  // Echo the XML response to the page
  echo $output;
?>
curl -X ""

Example Response

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE response [
    <!ELEMENT response (result,result_description)>
    <!ELEMENT result (#PCDATA)>
    <!ELEMENT result_description (#PCDATA)>
    
    ]>
<response>
<result>success</result>
<result_description>
  <quantity>3</quantity>
  <numbers>
    <number>
      <tenDigit>5556666666</tenDigit>
    </number>
    <number>
      <tenDigit>5557777777</tenDigit>
    </number>
    <number>
      <tenDigit>5558888888</tenDigit>
    </number>
  </numbers>
</result_description>
</response>