Documentation

    Amazon Web Services

    Microsoft Azure

    RapidAPI

    APILayer

Last Update: 2024-12-11

Validation API


Table of Content


Subscribe on Azure Marketplace
Code samples
API endpoint: email
API endpoint: phonenumber
Troubleshooting

Subscribe at Azure Marketplace


Visit our listings page on the Azure Marketplace and click on 'Get It Now'.

In the Azure portal, choose the Pay-As-You-Go plan and click on 'Subscribe'.

Select a resource group, give the subscription an internal name, and click on 'Review + subscribe'.

Click on 'Subscribe' to finalize your subscription.

Begin creating your account on our platform by clicking on 'Configure account now'.

You will be directed to the registration page. Here, fill in your account details in the provided fields. After entering all necessary information, click on 'Subscribe' 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


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 HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api-azr.silverlining.cloud/validation/email");
request.Headers.Add("Ocp-Apim-Subscription-Key", "<YourApiKey>");
var content = new StringContent("{\n    \"emailAddress\": \"support@silverlining.cloud\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

The following code sample calls the phone number validation endpoint with "+436705509930". Replace <YourApiKey> with the actual API Key you received during the sign-up process:

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api-azr.silverlining.cloud/validation/phonenumber");
request.Headers.Add("Ocp-Apim-Subscription-Key", "<YourApiKey>");
var content = new StringContent("{\n  \"phoneNumber\": \"+436705509930\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
API endpoint: /validation/email


URL endpoint: https://api-azr.silverlining.cloud/validation/email


Method: POST


"header": {
  "Ocp-Apim-Subscription-Key": STRING,
  "Content-Type": "application/json"
}


"body": {
  "emailAddress": STRING
}



Required

"emailAddress": The email address to validate. Must be in a standard email format, e.g., support@silverlining.cloud.

Response:


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

"provided_email_address": The email address sent in the request for validation.

"status": The validation result for the email address. Possible 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: /validation/phonenumber


URL endpoint: https://api-azr.silverlining.cloud/validation/phonenumber


Method: POST


"header": {
  "Ocp-Apim-Subscription-Key": STRING,
  "Content-Type": "application/json"
}


"body": {
  "phoneNumber": STRING
}



Required

"phoneNumber": The phone number to validate. Must be in international format with the country code, e.g., +436705509930.

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
  }
}

"provided_phone_number": The phone number sent in the request for validation.

"formatted_phone_number": An object containing:

"country_code": The country dialing code for the phone number (e.g., 43 for Austria).

"national_number": The phone number without the country code.

"is_valid": A boolean value indicating whether the phone number is valid.

"area_description": The geographical area or country of the phone number (e.g., "Austria").

"carrier": The carrier associated with the phone number (e.g., "spusu").

"timezone": The timezone associated with the phone number's location (e.g., "Europe/Vienna").

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.