Phone Validation API

VALIDATE PHONE NUMBERS BEFORE SENDING MESSAGES AND FILTER OUT INVALID NON EXISTENT CONTACTS

API Outcome

  • Type of service Identify different types of phone number services such as mobile, landline, toll free, special services and more.
  • Carrier information Find information about the service provider specific to the location at which phone number is registered.
  • Registered location User's registered country name and local area details as registered in service provider's database.
  • Country code and prefix Accurate country code and prefix data for more than 230 supported countries in the world.
  • Localized and international formats Show localized phone numbers in your application as per user's locale with local and international formats.

Get Free Trial

Create a free account Or “Talk to Us” for price information and other queries.

Single Contact Validation API Details

Request

TypeURL
POSThttps://api.attestr.com/api/{version}/public/checkx/contact

Request Body Parameters

TypeNameDescriptionOptional (default)Min VersionMax Version
StringnumberInput phone number to be verified.Requiredv1

Only valid E.164 formats with leading country code prefix are supported.

Request Header Parameters

TypeNameValue / DescriptionOptionalMin VersionMax Version
StringContent-Typeapplication/jsonRequiredv1
StringAuthorizationBasic {authToken}Requiredv1

If you do not have the authentication token, please refer to Register App to generate one.

Sample Request Payload

JSON
Copy

Response

HTTP status code 200

Please note that the valid key decides the availability of rest of the keys in the response. If provided contact number does not exist, all keys except valid and message are omitted. If true, remaining keys will have appropriate data.

KeyDescriptionTypeMin VersionMax Version
validTrue | false depending on if provided contact number exists and is validBooleanv1
typeType of service for the provided contact numberContactServiceTypeEnumv1
localFLocalized format of the input contact number when distributed locally.Booleanv1
intlFInternational E.164 formatBooleanv1
prefixPhone number prefix for the countryStringv1
codeCountry codeStringv1
countryCountry where the contact number is registeredStringv1
areaArea (state) where phone number is registeredStringv1
carrierService provider entity / companyStringv1
messageError message if provided number is invalidStringv1

ContactServiceTypeEnum

Enum ValuesDescription
MOBILECellular mobile service
LANDLINEFixed landline / dialed line service
SPECIALListed under special services such as police, ambulance, fire etc
TOLLFREEToll free service
HOTLINEPremium paid hotline service
SATELLITESatellite phone
PAGINGUsed in paging devices

Sample Response

Sample response for valid contact number

JSON
Copy

Sample response for invalid contact number

JSON
Copy

Error Response

ParameterTypeDescription
codeNumberUnique error codes for different errors. Always available.
messageStringError message describing the error. Always Available.
detailsStringDetail error message. Available only for certain types of errors.

Error Codes

HTTP StatusError CodeError Message
4004001Malformed data or missing required parameter values
4004005Operation could not be performed due to low credits balance
4014016Invalid client authorization
4034031Unauthorized access
4034035Requested service is not provisioned for your account
4034039Client's IP address is not whitelisted
4034035Requested service is not provisioned for your account
4294291Maximum account rate limit exceeded
4294292Maximum API rate limit exceeded
4294293Maximum account daily limit exceeded
4294294Maximum API daily limit exceeded
5005001Request could not be processed

Sample Error Response

JSON
Copy

Get Free Trial

Create a free account Or “Talk to Us” for price information and other queries.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard