This microservice takes as parameters one email or domain and one provider and returns whether the corresponding email address is disposable. The microservice provides only one route.
Parameters
email
- the email address to validate (required)provider
- the validation provider to be used (optional)
In case no provider param is posted, the service uses the one which is set as default. Any extra parameters will be ignored.
The microservice caches the returned value for a given time and returns Success-Error response in json format.
Post /api/validate
Accept: application/x-www-form-urlencoded
Name | Value | Required/Optional |
---|---|---|
the email address to validate | required | |
provider | string, the email validation provider to use | optional |
Currently the service supports two providers
* kickbox(default)
* debounce
Currently the service supports two providers
* Redis
* Memcached
In case non of the above Classes are installed the API
is still usable.
Response body:
{
"disposable": "false"
}
Response body:
{
"disposable": "true"
}
Response body:
{
"message": "error_message"
}
* 422 The email param is required
Inside projects directory command line run:
php artisan serve
From the root of the project run
.\vendor\bin\phpunit
./vendor/bin/phpunit