# get()

Canonical URL: https://developers.iagenify.com/sdk/ref/domains/get/
Language: en

`api.domains.get(id) → Promise<Domain>`

One domain, by its identifier or by its name — get("example.com") works.

Status: id or name · free · 404 if not attached

```javascript
const domain = await api.domains.get("example.com");
const same   = await api.domains.get(domain.id);
```

> **Taking the name is the useful part**
>
> A domain is identified by its name everywhere else — in a customer's message, in a support ticket, in a configuration file. Having to look up an identifier first would be a step for nothing.

## It is a read, not a check {#fresh}

`status` and `dns` are what was last recorded. To re-read the zone and have `status` move, call [check()](/sdk/ref/domain/check).

## records and mail come with it {#subobjects}

```javascript
const domain = await api.domains.get("example.com");

await domain.records.list();
await domain.mail.status();
```

## Errors {#errors}

A name that is not attached to this account answers 404 — including one attached to someone else's, which is the same answer on purpose.

- [Domain](/sdk/ref/domain): What a domain carries, and what you can do to it.
- [records.list()](/sdk/ref/domain/records/list): What is in the zone.

```python
domain = api.domains.get("example.com")
same = api.domains.get(domain.id)
```

```python
domain = api.domains.get("example.com")

domain.records.list()
domain.mail.status()
```
