🚀 Official Ruby client for EmailVerify.io — fast and accurate email verification API.
- Validate emails in real-time
- Detect disposable & risky emails
- Improve email deliverability
- Check account balance
👉 Get free API key: https://emailverify.io
Why EmailVerify.io?
- âš¡ Sub-second email verification
- 🎯 High accuracy (SMTP-level checks)
- 💰 Cost-effective vs competitors
- 🔌 Easy integration across Ruby, PHP, Go, and .NET
Quick start
- Add to your Gemfile or install locally
gem "emailverify", git: "https://github.com/Clustox/emailverify-ruby.git"- Configure (only api_key is strictly required)
Emailverify.configure do |config|
config.api_key = "YOUR_API_KEY"
end
result = Emailverify.validate("jane@example.com")
if Emailverify.valid?("jane@example.com")
puts "valid"
else
puts "invalid"
end
balance = Emailverify.check_balance # or client.check_balance(batch_id)
# Validate example (EmailVerify.io v1)
# The gem will call:
# https://app.emailverify.io/api/v1/validate?key=<YOUR_API_KEY>&email=valid@example.com
# and return parsed JSON, for example:
# {
# "email": "jhon123@gmail.com",
# "status": "valid",
# "sub_status": "permitted"
# }
# Modern usage (Response objects)
# The client now returns an `Emailverify::Response` wrapper with helper accessors.
Emailverify.configure do |c|
c.api_key = ENV['EMAILVERIFY_API_KEY']
end
# Module-level convenience
resp = Emailverify.validate('jane@example.com')
puts resp.status # => 'valid' (string)
puts resp.sub_status # => 'permitted' or nil
puts resp.to_h # => raw Hash if you need it
balance = Emailverify.check_balance
puts balance.api_status # => 'enabled'
puts balance.available_credits
# Balance example (EmailVerify.io v2)
# The gem will call:
# https://app.emailverify.io/api/v2/check-account-balance?key=<YOUR_API_KEY>
# and return the parsed JSON, for example:
# {
# "api_status": "enabled",
# "available_credits": 16750
# }Notes on endpoints
The gem ships with sensible defaults for endpoints, but your service may have different paths. You can pass an endpoint: option to each method or override the configured endpoints via Emailverify.configure.
Security
- The client will send the API key in an Authorization header for endpoints that expect it. The EmailVerify.io endpoints used by this gem (v1 validate and v2 check-account-balance) use the
keyquery parameter, and the client passes this automatically for those methods.
Contributing
Pull requests welcome. Run tests with bundle install && bundle exec rake.
License
Licensed under the MIT License — see the LICENSE file for details.