Phone Verification API

CheckPhoneNumbers

Use the CheckPhoneNumbers method to validate and get info about multiple phone numbers at once.

Syntax

CheckPhoneNumbers(PhoneNumbers, LicenseKey)

Request Parameters

Parameter NameDescriptionData TypeRequiredSample Value
PhoneNumbersOne or more phone numbers that you want to check.Array of String valuesTrue7575449510
LicenseKeyYour license key.StringTrue00000000-0000-0000-0000-000000000000

Response

Returns: Array of PhoneReturn objects

Code Samples

You can use any programming language you want with our API, as long as it can make a REST or SOAP call. Here are examples for some of the most common platforms.

C#

// https://ws.esendex.us/phoneverify/phoneverify.asmx?wsdl was added as a Service Reference and given the name WSDL

using WSDL;

var client = new PhoneVerifySoapClient(PhoneVerifySoapClient.EndpointConfiguration.PhoneVerifySoap);
var phoneNumbers = new string[] { "17575449510", "18009843710" };
var licenseKey = "YOUR_LICENSE_KEY";
var responses = await client.CheckPhoneNumbersAsync(phoneNumbers, licenseKey);

foreach (var response in responses.CheckPhoneNumbersResult)
{
    Console.WriteLine("Company: " + (string.IsNullOrEmpty(response.Company) ? "No Information Found" : response.Company));
    Console.WriteLine("Valid: " + response.Valid);
    Console.WriteLine("Use: " + (string.IsNullOrEmpty(response.Use) ? "No Information Found" : response.Use));
    Console.WriteLine("State: " + (string.IsNullOrEmpty(response.State) ? "No Information Found" : response.State));
    Console.WriteLine("Switch: " + (string.IsNullOrEmpty(response.Switch) ? "No Information Found" : response.Switch));
    Console.WriteLine("RC: " + (string.IsNullOrEmpty(response.RC) ? "No Information Found" : response.RC));
    Console.WriteLine("OCN: " + (string.IsNullOrEmpty(response.OCN) ? "No Information Found" : response.OCN));
    Console.WriteLine("Original Number: " + (string.IsNullOrEmpty(response.OriginalNumber) ? "No Information Found" : response.OriginalNumber));
    Console.WriteLine("Clean Number: " + (string.IsNullOrEmpty(response.CleanNumber) ? "No Information Found" : response.CleanNumber));
    Console.WriteLine("Switch Name: " + (string.IsNullOrEmpty(response.SwitchName) ? "No Information Found" : response.SwitchName));
    Console.WriteLine("Switch Type: " + (string.IsNullOrEmpty(response.SwitchType) ? "No Information Found" : response.SwitchType));
    Console.WriteLine("Country: " + (string.IsNullOrEmpty(response.Country) ? "No Information Found" : response.Country));
    Console.WriteLine("CLLI: " + (string.IsNullOrEmpty(response.CLLI) ? "No Information Found" : response.CLLI));
    Console.WriteLine("Prefix Type: " + (string.IsNullOrEmpty(response.PrefixType) ? "No Information Found" : response.PrefixType));
    Console.WriteLine("LATA: " + (string.IsNullOrEmpty(response.LATA) ? "No Information Found" : response.LATA));
    Console.WriteLine("SMS: " + (string.IsNullOrEmpty(response.sms) ? "No Information Found" : response.sms));
    Console.WriteLine("Email: " + (string.IsNullOrEmpty(response.Email) ? "No Information Found" : response.Email));
    Console.WriteLine("Date Assigned: " + (string.IsNullOrEmpty(response.AssignDate) ? "No Information Found" : response.AssignDate));
    Console.WriteLine("Telecom City: " + (string.IsNullOrEmpty(response.TelecomCity) ? "No Information Found" : response.TelecomCity));
    Console.WriteLine("Telecom County: " + (string.IsNullOrEmpty(response.TelecomCounty) ? "No Information Found" : response.TelecomCounty));
    Console.WriteLine("Telecom State: " + (string.IsNullOrEmpty(response.TelecomState) ? "No Information Found" : response.TelecomState));
    Console.WriteLine("Telecom ZIP: " + (string.IsNullOrEmpty(response.TelecomZip) ? "No Information Found" : response.TelecomZip));
    Console.WriteLine("Time Zone: " + (string.IsNullOrEmpty(response.TimeZone) ? "No Information Found" : response.TimeZone));
    Console.WriteLine("Latitude: " + (string.IsNullOrEmpty(response.Lat) ? "No Information Found" : response.Lat));
    Console.WriteLine("Longitude: " + (string.IsNullOrEmpty(response.Long) ? "No Information Found" : response.Long));
    Console.WriteLine("Wireless: " + response.Wireless);
    Console.WriteLine();
}

Console.ReadLine();

Java

import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;

public class CheckPhoneNumbers {
    public static void main(String[] args) {
        try {
            URL url = new URL("https://ws.esendex.us/phoneverify/phoneverify.asmx/CheckPhoneNumbers?"
                              + "PhoneNumbers=17575449510"
                              + "&PhoneNumbers=18009843710"
                              + "&LicenseKey=YOUR LICENSE KEY");
            try {
                InputStream in = url.openStream();
                StreamSource source = new StreamSource(in);
                printResult(source);
            } catch (java.io.IOException e) {
                e.printStackTrace();
            }
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
    }

    private static void printResult(Source source) {
        try {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            StreamResult sr = new StreamResult(bos);
            Transformer trans = TransformerFactory.newInstance().newTransformer();
            Properties oprops = new Properties();
            oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
            trans.setOutputProperties(oprops);
            trans.transform(source, sr);
            System.out.println("**** Response ******");
            System.out.println(bos.toString());

            bos.close();
            System.out.println();
        } catch (Exception e) {
        }
    }
}

Python

import zeep

client = zeep.Client(wsdl="https://ws.esendex.us/phoneverify/phoneverify.asmx?wsdl")
ArrayOfString = client.get_type("ns0:ArrayOfString")
phone_numbers = ArrayOfString(["17575449510", "18009843710"])
license_key = "00000000-0000-0000-0000-000000000000"
responses = client.service.CheckPhoneNumbers(phone_numbers, license_key)

print(responses)

GET Request

GET /phoneverify/phoneverify.asmx/CheckPhoneNumbers?PhoneNumbers=string&PhoneNumbers=string&LicenseKey=string HTTP/1.1
Host: ws.esendex.us

POST Request

POST /phoneverify/phoneverify.asmx/CheckPhoneNumbers HTTP/1.1
Host: ws.esendex.us
Content-Type: application/x-www-form-urlencoded
Content-Length: length

PhoneNumbers=string&PhoneNumbers=string&LicenseKey=string

SOAP 1.1 Request

POST /phoneverify/phoneverify.asmx HTTP/1.1
Host: ws.esendex.us
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://ws.cdyne.com/PhoneVerify/query/CheckPhoneNumbers"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <CheckPhoneNumbers xmlns="http://ws.cdyne.com/PhoneVerify/query">
      <PhoneNumbers>
        <string>string</string>
        <string>string</string>
      </PhoneNumbers>
      <LicenseKey>string</LicenseKey>
    </CheckPhoneNumbers>
  </soap:Body>
</soap:Envelope>

SOAP 1.1 Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <CheckPhoneNumbersResponse xmlns="http://ws.cdyne.com/PhoneVerify/query">
      <CheckPhoneNumbersResult>
        <PhoneReturn>
          <Company>string</Company>
          <Valid>boolean</Valid>
          <Use>string</Use>
          <State>string</State>
          <Switch>string</Switch>
          <RC>string</RC>
          <OCN>string</OCN>
          <OriginalNumber>string</OriginalNumber>
          <CleanNumber>string</CleanNumber>
          <SwitchName>string</SwitchName>
          <SwitchType>string</SwitchType>
          <Country>string</Country>
          <CLLI>string</CLLI>
          <PrefixType>string</PrefixType>
          <LATA>string</LATA>
          <sms>string</sms>
          <Email>string</Email>
          <AssignDate>string</AssignDate>
          <TelecomCity>string</TelecomCity>
          <TelecomCounty>string</TelecomCounty>
          <TelecomState>string</TelecomState>
          <TelecomZip>string</TelecomZip>
          <TimeZone>string</TimeZone>
          <Lat>string</Lat>
          <Long>string</Long>
          <Wireless>boolean</Wireless>
          <LRN>string</LRN>
        </PhoneReturn>
        <PhoneReturn>
          <Company>string</Company>
          <Valid>boolean</Valid>
          <Use>string</Use>
          <State>string</State>
          <Switch>string</Switch>
          <RC>string</RC>
          <OCN>string</OCN>
          <OriginalNumber>string</OriginalNumber>
          <CleanNumber>string</CleanNumber>
          <SwitchName>string</SwitchName>
          <SwitchType>string</SwitchType>
          <Country>string</Country>
          <CLLI>string</CLLI>
          <PrefixType>string</PrefixType>
          <LATA>string</LATA>
          <sms>string</sms>
          <Email>string</Email>
          <AssignDate>string</AssignDate>
          <TelecomCity>string</TelecomCity>
          <TelecomCounty>string</TelecomCounty>
          <TelecomState>string</TelecomState>
          <TelecomZip>string</TelecomZip>
          <TimeZone>string</TimeZone>
          <Lat>string</Lat>
          <Long>string</Long>
          <Wireless>boolean</Wireless>
          <LRN>string</LRN>
        </PhoneReturn>
      </CheckPhoneNumbersResult>
    </CheckPhoneNumbersResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2 Request

POST /phoneverify/phoneverify.asmx HTTP/1.1
Host: ws.esendex.us
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <CheckPhoneNumbers xmlns="http://ws.cdyne.com/PhoneVerify/query">
      <PhoneNumbers>
        <string>string</string>
        <string>string</string>
      </PhoneNumbers>
      <LicenseKey>string</LicenseKey>
    </CheckPhoneNumbers>
  </soap12:Body>
</soap12:Envelope>

SOAP 1.2 Response

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <CheckPhoneNumbersResponse xmlns="http://ws.cdyne.com/PhoneVerify/query">
      <CheckPhoneNumbersResult>
        <PhoneReturn>
          <Company>string</Company>
          <Valid>boolean</Valid>
          <Use>string</Use>
          <State>string</State>
          <Switch>string</Switch>
          <RC>string</RC>
          <OCN>string</OCN>
          <OriginalNumber>string</OriginalNumber>
          <CleanNumber>string</CleanNumber>
          <SwitchName>string</SwitchName>
          <SwitchType>string</SwitchType>
          <Country>string</Country>
          <CLLI>string</CLLI>
          <PrefixType>string</PrefixType>
          <LATA>string</LATA>
          <sms>string</sms>
          <Email>string</Email>
          <AssignDate>string</AssignDate>
          <TelecomCity>string</TelecomCity>
          <TelecomCounty>string</TelecomCounty>
          <TelecomState>string</TelecomState>
          <TelecomZip>string</TelecomZip>
          <TimeZone>string</TimeZone>
          <Lat>string</Lat>
          <Long>string</Long>
          <Wireless>boolean</Wireless>
          <LRN>string</LRN>
        </PhoneReturn>
        <PhoneReturn>
          <Company>string</Company>
          <Valid>boolean</Valid>
          <Use>string</Use>
          <State>string</State>
          <Switch>string</Switch>
          <RC>string</RC>
          <OCN>string</OCN>
          <OriginalNumber>string</OriginalNumber>
          <CleanNumber>string</CleanNumber>
          <SwitchName>string</SwitchName>
          <SwitchType>string</SwitchType>
          <Country>string</Country>
          <CLLI>string</CLLI>
          <PrefixType>string</PrefixType>
          <LATA>string</LATA>
          <sms>string</sms>
          <Email>string</Email>
          <AssignDate>string</AssignDate>
          <TelecomCity>string</TelecomCity>
          <TelecomCounty>string</TelecomCounty>
          <TelecomState>string</TelecomState>
          <TelecomZip>string</TelecomZip>
          <TimeZone>string</TimeZone>
          <Lat>string</Lat>
          <Long>string</Long>
          <Wireless>boolean</Wireless>
          <LRN>string</LRN>
        </PhoneReturn>
      </CheckPhoneNumbersResult>
    </CheckPhoneNumbersResponse>
  </soap12:Body>
</soap12:Envelope>

XML Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfPhoneReturn xmlns="http://ws.cdyne.com/PhoneVerify/query">
  <PhoneReturn>
    <Company>string</Company>
    <Valid>boolean</Valid>
    <Use>string</Use>
    <State>string</State>
    <Switch>string</Switch>
    <RC>string</RC>
    <OCN>string</OCN>
    <OriginalNumber>string</OriginalNumber>
    <CleanNumber>string</CleanNumber>
    <SwitchName>string</SwitchName>
    <SwitchType>string</SwitchType>
    <Country>string</Country>
    <CLLI>string</CLLI>
    <PrefixType>string</PrefixType>
    <LATA>string</LATA>
    <sms>string</sms>
    <Email>string</Email>
    <AssignDate>string</AssignDate>
    <TelecomCity>string</TelecomCity>
    <TelecomCounty>string</TelecomCounty>
    <TelecomState>string</TelecomState>
    <TelecomZip>string</TelecomZip>
    <TimeZone>string</TimeZone>
    <Lat>string</Lat>
    <Long>string</Long>
    <Wireless>boolean</Wireless>
    <LRN>string</LRN>
  </PhoneReturn>
  <PhoneReturn>
    <Company>string</Company>
    <Valid>boolean</Valid>
    <Use>string</Use>
    <State>string</State>
    <Switch>string</Switch>
    <RC>string</RC>
    <OCN>string</OCN>
    <OriginalNumber>string</OriginalNumber>
    <CleanNumber>string</CleanNumber>
    <SwitchName>string</SwitchName>
    <SwitchType>string</SwitchType>
    <Country>string</Country>
    <CLLI>string</CLLI>
    <PrefixType>string</PrefixType>
    <LATA>string</LATA>
    <sms>string</sms>
    <Email>string</Email>
    <AssignDate>string</AssignDate>
    <TelecomCity>string</TelecomCity>
    <TelecomCounty>string</TelecomCounty>
    <TelecomState>string</TelecomState>
    <TelecomZip>string</TelecomZip>
    <TimeZone>string</TimeZone>
    <Lat>string</Lat>
    <Long>string</Long>
    <Wireless>boolean</Wireless>
    <LRN>string</LRN>
  </PhoneReturn>
</ArrayOfPhoneReturn>

Let’s start sending, together.