Re-checks DNS and updates verification status. `:domain` is a MailDomain id or hostname. Permission: `domains`.

## Path Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| `domain` | string | **Required.** MailDomain id or hostname. |

## Response Fields

| Field | Type | Description |
| ----- | ---- | ----------- |
| `status` | string | Lumail domain status after the check. |
| `isVerified` | boolean | `true` when SES identity is verified. |
| `verificationStatus` | string | SES identity verification status. |
| `dkimVerificationStatus` | string | DKIM status. |
| `mailFromStatus` | string | MAIL FROM status. |
| `dnsRecords` | array | Per-record DNS status. |
| `id` | string | MailDomain id when present. |

## Errors

| Status | `name` | When |
| ------ | ------ | ---- |
| 401 | `missing_api_key` | Missing or invalid bearer token |
| 403 | `missing_permission` | Token lacks the `domains` permission |
| 404 | `not_found` | Unknown id or hostname |

## Related

- [Get Domain](/docs/api-reference/v2/domains-get)
- [SDK: lumail.domains.verify](/docs/sdk/v2/domains-verify)


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

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

const lumail = new Lumail({ apiKey: process.env.LUMAIL_API_KEY });
const { data, error } = await lumail.domains.verify("mail.example.com");
if (error) {
  throw error;
}
console.log(data.status);
```

### cURL
```bash
curl -X POST https://lumail.io/api/v2/domains/mail.example.com/verify \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

### JavaScript
```javascript
const response = await fetch(
  "https://lumail.io/api/v2/domains/mail.example.com/verify",
  {
    method: "POST",
    headers: {
      Authorization: "Bearer YOUR_API_TOKEN",
    },
  },
);
const data = await response.json();
```

### Success Response
```json
{
  "status": "VERIFIED",
  "isVerified": true,
  "verificationStatus": "Success",
  "dkimVerificationStatus": "Success",
  "mailFromStatus": "Success",
  "dnsRecords": []
}
```

### Error Response
```json
{
  "name": "not_found",
  "message": "Domain not found",
  "statusCode": 404
}
```
