GET
/
validatePhone
curl --request GET \
  --url https://greipapi.com/validatePhone \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "carrier": "",
    "reason": "Invalid phone number structure.",
    "isValid": false
  },
  "status": "success",
  "executionTime": 1
}

Query Parameters

phone
string
required

The phone command is used to specify the phone number you want to validate.

Expected values: a phone number

Sample value: +12121234567, 0012121234567, 12121234567, or 2121234567

countryCode
string
required

The ISO 3166-1 alpha-2 format of the country code of the phone number. Learn more

Sample value: US

format
string
default: "JSON"

The format command is used to get a response in a specific format.

Expected values: JSON, XML, CSV, or Newline

For more information please refer to Response Format.

mode
string
default: "live"

The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.

Expected values: live, or test.

For more information please refer to Development Environment.

userID
string

The userID command can be used to identify requests sent by specific users to monitor in the Events Page.

Expected values: email address, phone number, user id, name, etc.

For more information please refer to User Identifier.

callback
string

The callback command can help you make the response as a JSONP format.

Expected values: any name that can be used as a function name in Javascript, e.g: myFunctionName.

For more information please refer to JSONP Callback.

Response properties

data
object
required
carrier
string
required

Carrier name of the phone number.

reason
string
required

The reason behind considering this phone number as risky.

Note: The value of this property will be empty if the isValid is true.

isValid
boolean
required

A boolean value that you can rely on to determine if the phone number is 100% safe & valid or not.

status
string
required

The response status.

Expected values: success, or error.

executionTime
integer
required

Time spent in milliseconds to process the data.

What can I expect from this API?

  • Detection of disposable email addresses (also known as Temporary Email Addresses)
  • Testing the email service provider of a given email address
  • Validation of email syntax