How to Use the usevalid.email API Endpoint
In this tutorial, we will learn how to use the usevalid.email API endpoint to validate email addresses. We will cover how to send a request, handle successful responses, and manage exceptions. We will also explore the different status codes returned by the API.
Prerequisites
-
Basic knowledge of HTTP requests
-
curl
installed on your system -
RapidAPI account with access to the usevalid.email API
Endpoint Overview
The usevalid.email API endpoint for email validation is:
Base URL:
https://usevalid-email.p.rapidapi.com
POST /verify/v1
Sending a Request
To send a request to the usevalid.email API, use the following curl
command:
curl --request POST \
--url https://usevalid-email.p.rapidapi.com/verify/v1 \
--header 'X-RapidAPI-Host: usevalid-email.p.rapidapi.com' \
--header 'X-RapidAPI-Key: your_key' \
--data email=test@gmail.com
Successful Response
A successful response will return a status code of 200 OK
and a JSON body with the email validation result. Here is an example of a successful response:
{
"email": "test@gmail.com",
"user": "test",
"domain": "gmail.com",
"status": "valid",
"reason": "Email is valid",
"disposable": false
}