> ## Documentation Index
> Fetch the complete documentation index at: https://docs.minerva.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate Emails

> Validate email addresses and check their presence in the Minerva database

<div style={{ display: 'none' }} aria-hidden="false">
  ## Quick Answer

  **How do I validate email addresses or check if they exist in Minerva?** Use this endpoint to check if email addresses are valid and whether they exist in the Minerva database.

  **Common questions this endpoint answers:**

  * How do I validate email addresses?
  * How do I check if an email exists in the Minerva database?
  * How can I verify email validity before enriching?
  * How do I see when an email was last seen?
  * How can I filter my email list to only Minerva-known contacts?
  * How do I check email quality?

  **What you need:** List of email addresses (up to 2000 per request).

  **What you get back:** For each email: whether it's found in Minerva, validation status, and last seen timestamp.

  **Common use cases:**

  * Pre-validate emails before using resolve/enrich
  * Filter email lists to focus on known contacts
  * Check data freshness with last seen dates
  * Verify email quality and validity
</div>

## Overview

The Validate Emails endpoint checks if email addresses exist in the Minerva database and provides validation status and last seen date information. This endpoint accepts a simple list of email address strings and returns match status, validation status, and last seen timestamps for each email.

The endpoint automatically handles email normalization and will attempt to match both the original email and any sanitized versions against the Minerva database.

## Request

### Headers

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication
</ParamField>

<ParamField header="Content-Type" type="string" required>
  application/json
</ParamField>

### Request Body

<ParamField body="records" type="string[]" required>
  An array of email address strings to validate. Maximum 2000 email addresses per request.

  Each element in the array should be a simple email address string (e.g., "[user@example.com](mailto:user@example.com)").
</ParamField>

## Response

### Response Structure

<ResponseField name="api_request_id" type="string">
  Unique identifier for this API request
</ResponseField>

<ResponseField name="results" type="array">
  Array of validation results, one per input email
</ResponseField>

<ResponseField name="request_completed_at" type="string">
  ISO 8601 timestamp when the request was completed
</ResponseField>

#### Result Object

<ResponseField name="email_address" type="string">
  The original email address from the request
</ResponseField>

<ResponseField name="is_match" type="boolean">
  Whether this email address (or its sanitized version) was found in the Minerva database
</ResponseField>

<ResponseField name="email_validation_status" type="string">
  Validation status of the email address. Can be "valid", "invalid", "unknown", or null if no match was found.
</ResponseField>

<ResponseField name="email_last_seen" type="string">
  ISO 8601 timestamp of when this email was last seen in the Minerva database. Returns null if the email was not found.
</ResponseField>

<Note>
  Error responses include `statusCode` and `body` fields for backward compatibility with existing integrations. These are deprecated — prefer reading the HTTP status code and the top-level `api_request_id` / `error_message` fields directly.
</Note>

<ResponseExample>
  ```json 200 Response theme={null}
  {
    "api_request_id": "req_email456",
    "results": [
      {
        "email_address": "john.smith@gmail.com",
        "is_match": true,
        "email_validation_status": "valid",
        "email_last_seen": "2024-01-10T15:30:00.000000"
      },
      {
        "email_address": "jane.doe@example.com",
        "is_match": true,
        "email_validation_status": "valid",
        "email_last_seen": "2023-12-15T09:22:00.000000"
      },
      {
        "email_address": "invalid@nonexistent.com",
        "is_match": false,
        "email_validation_status": null,
        "email_last_seen": null
      }
    ],
    "request_completed_at": "2024-01-15T10:30:45.123456"
  }
  ```

  ```json 400 theme={null}
  {
    "api_request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "error_message": "Input data must contain a 'records' key with a list of inputs"
  }
  ```

  ```json 401 theme={null}
  {
    "api_request_id": "b2c3d4e5-f6a7-1234-bcde-f12345678901",
    "error_message": "Unauthorized"
  }
  ```

  ```json 413 theme={null}
  {
    "api_request_id": "d4e5f6a7-b8c9-3456-def0-234567890123",
    "error_message": "Maximum number of records for /v2/validate_emails endpoint is 2000"
  }
  ```

  ```json 422 theme={null}
  {
    "api_request_id": "e5f6a7b8-c9d0-4567-ef01-345678901234",
    "error_message": "Input data must contain a 'records' key with a list of inputs"
  }
  ```

  ```json 429 theme={null}
  {
    "api_request_id": "f6a7b8c9-d0e1-5678-f012-456789012345",
    "error_message": "You reached your total request-rate limit, please contact help@minerva.io for help"
  }
  ```
</ResponseExample>

## Error Responses

* `400` - Bad Request: Invalid input format
* `401` - Unauthorized: Invalid or missing API key
* `413` - Payload Too Large: More than 2000 email addresses in request
* `422` - Unprocessable Entity: Invalid request structure
* `429` - Too Many Requests: Rate limit exceeded
* `500` - Internal Server Error: Unexpected server error

## Notes

* **API Version**: This endpoint only supports v2 (`/v2/validate_emails`)
* **Rate Limits**: Maximum 2000 email addresses per request
* **Email Normalization**: Email addresses are automatically sanitized and normalized. The endpoint will match against both the original email and sanitized versions
* **Match Priority**: If multiple versions of an email match (original vs. sanitized), the endpoint returns the best match based on most recent `email_last_seen` date
* **Return Order**: Results are returned in the same order as the input array
* **Use Case**: Use this endpoint to verify email existence in Minerva's database before using resolve or enrich endpoints
* **Database Matching**: Emails are matched against the `data_lake.email_validation` table using MD5 hashes of lowercase email addresses
