`lumail@2.1.0` · [`lumail.domains`](/docs/sdk/v2/domains)

```typescript
domains.get(domainOrId: string): Promise<LumailResult<DomainRecord>>
```

Id or hostname.

## Path Parameters

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

## Response Fields

| Field | Type | Description |
| ------------ | --------- | ----------------------------------------------- |
| `id` | string | Domain id. |
| `domain` | string | Hostname. |
| `status` | string | Verification status (`PENDING`, `VERIFIED`, …). |
| `region` | string | Optional SES region. |
| `createdAt` | string | Optional ISO 8601 timestamp. |
| `sesRecords` | unknown | Optional provider DNS payload. |
| `dnsRecords` | unknown[] | Optional DNS records to publish. |
| `message` | string | Optional status note. |

`data` is the domain record. Failures return `{ data: null, error: { name, message, statusCode } }`.


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

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

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

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

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

### Success Response
```json
{
  "id": "dom_abc123",
  "domain": "mail.example.com",
  "status": "VERIFIED"
}
```

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