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

# Email Validity Enrich

> Second-stage enrichment for the email validity report: domain registration, per-server infrastructure, and identity footprint.

## Overview

`POST /api/email/validity/enrich` returns the heavier, best-effort context that
complements the fast verdict from
[Email Validity](/api-reference/endpoint/email-validity). Where the base call
answers "can this mailbox receive mail", the enrich call answers "what else do we
know about this address and its domain": how old the domain is, where its mail
servers are hosted and whether they are on any blocklist, and the public
identity footprint tied to the address.

It is designed to be called right after the base validity check so a report can
fill in progressively. The response contains only the enrichment fields, meant
to be merged into the verdict you already have.

This endpoint is free. The base
[Email Validity](/api-reference/endpoint/email-validity) call already charged for
the lookup, so enrichment does not cost additional credits.

## Authentication

Works with an API key or an in-app session. For API access, pass your key in the
`Authorization` header.

```bash theme={"dark"}
Authorization: Bearer YOUR_API_KEY
```

## Request

<ParamField body="email" type="string" required>
  The email address to enrich.
</ParamField>

### Example request

<CodeGroup>
  ```bash cURL (API Key) theme={"dark"}
  curl -X POST "https://encrata.com/api/email/validity/enrich" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"email": "jane@example.com"}'
  ```

  ```python Python theme={"dark"}
  import requests

  resp = requests.post(
      "https://encrata.com/api/email/validity/enrich",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      json={"email": "jane@example.com"},
  )
  print(resp.json())
  ```

  ```javascript JavaScript theme={"dark"}
  const resp = await fetch("https://encrata.com/api/email/validity/enrich", {
    method: "POST",
    headers: {
      Authorization: "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ email: "jane@example.com" }),
  });
  const data = await resp.json();
  ```
</CodeGroup>

## Response

Returns only the enrichment fields. Every field is best-effort and may be absent
when a source has nothing to report.

<ResponseField name="email" type="string">
  The email address that was enriched (normalized to lowercase).
</ResponseField>

<ResponseField name="canonical" type="string">
  The provider-canonical form of the address (for example with plus tags and
  dots normalized).
</ResponseField>

<ResponseField name="free_provider" type="boolean">
  `true` when the domain is a consumer mailbox provider (for example Gmail or
  Outlook).
</ResponseField>

<ResponseField name="mx" type="string[]">
  The domain's resolved mail servers (MX hosts) in preference order.
</ResponseField>

<ResponseField name="domain_trust" type="object">
  The domain's outbound-security posture: `grade` (A to F), `spf`, `dmarc`,
  `dmarc_policy`, `mta_sts`, `tls_rpt`, plus the authentication extras `dkim`,
  `bimi`, and `dnssec`, and the raw DNS records behind them when present.
</ResponseField>

<ResponseField name="domain_info" type="object">
  Domain registration and DNS posture: `registrar`, `created_at`, `expires_at`,
  `age_days`, `nameservers`, `dnssec`, and the resolved `a` records.
</ResponseField>

<ResponseField name="mail_servers" type="object[]">
  Per-MX infrastructure and reputation. Each entry includes `host`, `ip`, `asn`,
  `org`, `country`, `hosting`, `blocklisted`, `blocklists`, `tls_issuer`,
  `tls_expires_at`, and `tls_days_left`.
</ResponseField>

<ResponseField name="footprint" type="object">
  The public identity footprint tied to the address. Fields include
  `gravatar_url` and `gravatar_profile`, `registered_services` (public services
  the address is registered on), `recovery_emails` and `recovery_phones` (masked
  recovery hints), a linked `google` account summary (`name`,
  `profile_photo_url`, `gaia_id`, `active_services`, `last_profile_edit`), and a
  `breaches` summary (`count`, `exposed_data`, `services`).
</ResponseField>

<ResponseField name="cached" type="boolean">
  `true` when the enriched report was served from cache rather than freshly
  gathered. Present only on a cache hit.
</ResponseField>

### Example response

```json theme={"dark"}
{
  "email": "jane@example.com",
  "canonical": "jane@example.com",
  "free_provider": false,
  "mx": ["aspmx.l.google.com", "alt1.aspmx.l.google.com"],
  "domain_trust": {
    "grade": "A",
    "spf": true,
    "dmarc": true,
    "dmarc_policy": "reject",
    "mta_sts": "enforce",
    "tls_rpt": true,
    "dkim": true,
    "bimi": false,
    "dnssec": true
  },
  "domain_info": {
    "registrar": "MarkMonitor Inc.",
    "created_at": "2008-03-20",
    "expires_at": "2027-03-20",
    "age_days": 6695,
    "nameservers": ["ns1.example.com", "ns2.example.com"],
    "dnssec": true,
    "a": ["93.184.216.34"]
  },
  "mail_servers": [
    {
      "host": "aspmx.l.google.com",
      "ip": "142.250.113.27",
      "asn": "AS15169",
      "org": "Google LLC",
      "country": "US",
      "hosting": true,
      "blocklisted": false,
      "tls_issuer": "Google Trust Services",
      "tls_days_left": 67
    }
  ],
  "footprint": {
    "registered_services": [
      { "name": "github", "category": "developer", "url": "https://github.com" }
    ],
    "breaches": { "count": 2, "exposed_data": ["Email addresses", "Passwords"] }
  }
}
```

<Note>
  Call [Email Validity](/api-reference/endpoint/email-validity) first to get the
  verdict, then call this endpoint to fill in the fuller report. The base call
  is what charges credits; enrichment is free.
</Note>
