Documentation
    Amazon Web Services
    Microsoft Azure
    RapidAPI
    APILayer
Last Update: 2024-03-01

Email Address & Phone Number Validation API


Table of Content


Subscribe on AWS Marketplace
Code samples
API endpoint: email-address
API endpoint: phone-number
Troubleshooting

Subscribe on AWS Marketplace


Navigate to our product listing on the AWS Marketplace. Select the "View purchase options" button to proceed.

On the following page, click the "Subscribe" button to initiate the subscription process.

After subscribing, you will need to set up your account on our platform. Do this by clicking the "Set up your account" link provided.

You will be directed to the registration page. Here, fill in your account details in the provided fields. Once you have entered all necessary information, click the 'Subscribe' button to proceed.

Upon successful registration, your unique API key will be displayed. It is crucial to store this key in a secure location for future use.

Code samples


Code samples:

The following code sample calls the email address validation endpoint with "support@silverlining.cloud". Replace <YourApiKey> with the actual API Key you received during the sign-up process:

var client = new RestClient("https://validation-aws.silverlining.cloud/email-address");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<YourApiKey>");
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@"    ""emailAddress"": ""support@silverlining.cloud""" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

The following code sample calls the phone number validation endpoint with "+43 670 5509930":

var client = new RestClient("https://validation-aws.silverlining.cloud/phone-number");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<YourApiKey>");
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@"    ""phoneNumber"": ""+43 670 5509930""" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
API endpoint: email-address


URL endpoint: https://validation-aws.silverlining.cloud/email-address


Method: POST


"header": {
  "x-api-key": STRING,
  "Content-Type": "application/json"
}


"body": {
  "emailAddress": STRING,
}



Required

"emailAddress": The email address to be validated.


Response:

"body": {
  "validationResult": {
    "provided_email_address": STRING,
    "status": STRING
  }
}   


"status": Returns one of the following values:

  • "valid": Email address is valid
  • "AddressFormatError": Syntax error in the email address format
  • "DomainBlacklistedError": Host is suspicious
  • "DNSError": Host cannot be found
API endpoint: phone-number

URL endpoint: https://validation-aws.silverlining.cloud/phone-number


Method: POST


"header": {
  "x-api-key": STRING,
  "Content-Type": "application/json"
}


"body": {
  "phoneNumber": STRING,
}


Required

"phoneNumber": The phone number to be validated. The provided phone number can be in any common format, including "+", "(", ")", and "-" characters.

Response:

"body": {
  "validationResult": {
    "provided_phone_number": STRING,
    "formatted_phone_number": {
      "country_code": NUMBER,
      "national_number": NUMBER
    },
    "is_valid": BOOLEAN,
    "area_description": STRING,
    "carrier": STRING,
    "timezone": STRING
  }
}   


"area_description", "carrier"
and "timezone" are only available if this information can be retrieved from the phone number. Otherwise, these fields are empty.

Troubleshooting

"message": "Invalid Input: The request contains incorrectly formatted parameters"

This error message means that the body parameters you have passed are malformed. Please follow the instructions given in the endpoint descriptions. Common issues include forgetting to add a comma (',') after every parameter line or missing a parenthesis somewhere.

"message": "Endpoint request timed out"

You receive this error message when the code execution exceeds the maximum timeout (usually 29 seconds).