```typescript
lumail.verify(email | { email: string }): Promise<LumailResult<EmailVerification>>
```

```typescript
const { data, error } = await lumail.verify("user@example.com");

if (error) throw error;
if (!data.accept) {
  console.log(data.issues[0]?.code);
}
const next = data.suggestion ?? data.email;
```

## Body Parameters

| Name    | Type   | Description                                                     |
| ------- | ------ | --------------------------------------------------------------- |
| `email` | string | **Required.** Address to check. Also accepted as a bare string. |

## Response Fields

| Field        | Type                   | Description                                                                                                |
| ------------ | ---------------------- | ---------------------------------------------------------------------------------------------------------- |
| `object`     | `"email_verification"` | Resource type.                                                                                             |
| `id`         | string                 | Tenant-owned `verify_result` id.                                                                           |
| `email`      | string                 | Normalized address that was checked.                                                                       |
| `result`     | string                 | `deliverable`, `risky`, `undeliverable`, or `unknown`.                                                     |
| `accept`     | boolean                | Policy decision. Can be `true` when quota is exhausted.                                                    |
| `status`     | string                 | `completed`, `skipped`, or `failed`.                                                                       |
| `score`      | integer \| null        | 0–100 deliverability confidence.                                                                           |
| `suggestion` | string \| null         | Better address when the domain looks like a typo.                                                          |
| `traits`     | object                 | Domain category plus disposable, free-provider, privacy-alias, role-based, and suspicious-domain booleans. |
| `issues`     | object[]               | Errors and warnings only. Empty when the address is clean.                                                 |
| `quota`      | object                 | `{ limit, used, remaining, resets_at }` for the UTC month.                                                 |
| `retry_at`   | string \| null         | ISO timestamp when a retryable check should be tried again.                                                |
| `cache_hit`  | boolean                | `true` when the result was served from cache.                                                              |

Field details: [API reference](/docs/api-reference/v2/verify).

_Legacy `lumail.emails.verify()` still talks to `/api/v2/emails/verify`._


## API Reference
**Method:** POST
**Endpoint:** /api/v2/verify

### SDK
```ts
import { Lumail } from "lumail";

const lumail = new Lumail({ apiKey: process.env.LUMAIL_API_KEY });
const { data, error } = await lumail.verify("user@example.com");
if (error) {
  throw error;
}
if (!data.accept) {
  throw data.issues[0];
}
console.log(data.result, data.suggestion);
```

### cURL
```bash
curl -X POST https://lumail.io/api/v2/verify \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com"}'
```

### JavaScript
```javascript
const response = await fetch("https://lumail.io/api/v2/verify", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ email: "user@example.com" }),
});
const data = await response.json();
```

### Success Response
```json
{
  "object": "email_verification",
  "id": "vr_abc123",
  "email": "user@example.com",
  "result": "risky",
  "accept": true,
  "status": "completed",
  "score": 80,
  "suggestion": null,
  "traits": {
    "domain_category": "custom_domain",
    "disposable": false,
    "free_provider": false,
    "privacy_alias": false,
    "role_based": false,
    "suspicious_domain": false
  },
  "issues": [],
  "retry_at": null,
  "cache_hit": false
}
```

### Error Response
```json
{
  "name": "validation_error",
  "message": "email is required",
  "statusCode": 422
}
```
