API Overview

The ValidMail API provides programmatic access to email verification services. This RESTful API uses JSON for requests and responses.

Base URL

All API requests should be made to the following base URL:

https://validmail.io/api/v1

Request Format

All requests must include the following headers:

Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

Request bodies should be JSON:

{
  "email": "test@example.com"
}

Response Format

All responses are returned in JSON format with consistent structure:

Success Response

{
  "email": "test@example.com",
  "status": "valid",
  "score": 95,
  "verdict": "Email verified with high confidence",
  "checks": { ... },
  "meta": {
    "responseTime": 1234
  }
}

Error Response

{
  "error": {
    "code": "INVALID_EMAIL",
    "message": "The email address format is invalid",
    "status": 400
  }
}

HTTP Status Codes

The API uses standard HTTP status codes:

CodeDescription
200Request successful
400Bad request - invalid parameters
401Unauthorized - invalid or missing API key
403Forbidden - insufficient credits or permissions
429Rate limit exceeded
500Internal server error

API Versioning

The API version is included in the URL path. The current version is v1.

When we make breaking changes, we'll release a new version. The previous version will remain available for a deprecation period.

Official SDKs

We provide official SDKs for popular languages:

Node.js
npm install @validmail/sdk
Python
pip install validmail
PHP
composer require validmail/sdk
Ruby
gem install validmail

See our code examples for detailed SDK usage.