# List domains

`opensend.domains.list(input?)`

The domains of the workspace, newest first, with their status and region.

Needs the scope: `domains:read`

## Input

- `q` (string): Text to search for. Only items that contain it are returned. Up to 40 characters.
- `limit` (integer): How many items to return, from 1 to 100. Without it you get 25.
- `offset` (integer): How many items to skip. Use it with `limit` to read the next page. Default: `0`.
- `after` (string): The id of the last item you have. The answer starts with the item that follows it, which reads a long list without skipping or repeating when it changes meanwhile. Up to 64 characters.
- `before` (string): The id of the first item you have. The answer ends with the item just before it. Give this or `after`, not both. Up to 64 characters.
- `status` (string): Only domains in this state: `pending`, `verified` or `failed`. One of: `pending`, `verified`, `failed`.
- `region` (string): Only domains in this region. One of: `us-east-1`, `eu-west-1`, `ap-northeast-1`.

## Returns

The call resolves to the answer, already parsed. A call the API refuses throws `OpenSendError` with the code and the message of the answer. [SDK](https://opensend.sh/docs/sdk) lists the errors of the client itself.

- `object` ("list"): Always `list`.
- `data` (object[]): The items on this page.
- `data[].object` ("domain"): Always `domain`.
- `data[].id` (string): The id of the domain.
- `data[].name` (string): The domain name, such as `mail.example.com`.
- `data[].status` (string): Where verification stands: `pending` until every record is found, `verified` after that, `failed` when a record is wrong. One of: `pending`, `verified`, `failed`.
- `data[].region` (string): The region mail from this domain is sent from. One of: `us-east-1`, `eu-west-1`, `ap-northeast-1`.
- `data[].openTracking` (boolean): Whether opens are counted for mail from this domain.
- `data[].clickTracking` (boolean): Whether clicks are counted for mail from this domain.
- `data[].records` (object[]): The DNS records to publish, each with whether it was found.
- `data[].records[].id` (string): The id of the record.
- `data[].records[].type` (string): The type of DNS record: `MX`, `TXT` or `CNAME`. One of: `MX`, `TXT`, `CNAME`.
- `data[].records[].host` (string): The name to publish the record under.
- `data[].records[].value` (string): What the record has to hold.
- `data[].records[].priority` (integer | null): The priority of an `MX` record, and `null` for the other types.
- `data[].records[].ttl` (string): How long resolvers may keep the record, as your DNS provider writes it.
- `data[].records[].status` (string): Whether the record was found: `pending`, `verified` or `failed`. One of: `pending`, `verified`, `failed`.
- `data[].events` (object[]): What has happened to the domain since it was added.
- `data[].events[].id` (string): The id of the event.
- `data[].events[].title` (string): What happened, in a few words.
- `data[].events[].at` (string): When it happened.
- `data[].events[].status` (string): Where verification stood after it. One of: `pending`, `verified`, `failed`.
- `data[].events[].detail` (string): More about what happened.
- `data[].createdAt` (string): When the domain was added.
- `total` (integer): How many items match in all, on every page together.
- `hasMore` (boolean): Whether more items follow this page.

## Example

TypeScript:

```ts
await opensend.domains.list({
  status: 'pending',
})
```

CLI:

```bash
opensend domains list --status pending
```

Answer:

```json
{
  "object": "list",
  "data": [
    {
      "object": "domain",
      "id": "dom_02",
      "name": "news.example.com",
      "status": "pending",
      "region": "eu-west-1",
      "openTracking": true,
      "clickTracking": false,
      "records": [
        {
          "id": "mx",
          "type": "MX",
          "host": "send",
          "value": "feedback.mail.example.net",
          "priority": 10,
          "ttl": "Auto",
          "status": "verified"
        },
        {
          "id": "spf",
          "type": "TXT",
          "host": "send",
          "value": "v=spf1 include:mail.example.net ~all",
          "priority": null,
          "ttl": "Auto",
          "status": "verified"
        },
        {
          "id": "dkim",
          "type": "TXT",
          "host": "key1._domainkey",
          "value": "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8f2c41d09b7e45a1",
          "priority": null,
          "ttl": "Auto",
          "status": "verified"
        },
        {
          "id": "dmarc",
          "type": "TXT",
          "host": "_dmarc",
          "value": "v=DMARC1; p=none;",
          "priority": null,
          "ttl": "Auto",
          "status": "pending"
        }
      ],
      "events": [
        {
          "id": "added",
          "title": "Domain added",
          "at": "2026-11-21T09:30:00.000Z",
          "status": "pending",
          "detail": ""
        },
        {
          "id": "pending",
          "title": "Some records are missing",
          "at": "2026-11-27T08:30:00.000Z",
          "status": "pending",
          "detail": "DMARC is still propagating."
        }
      ],
      "createdAt": "2026-11-21T09:30:00.000Z"
    }
  ],
  "total": 1,
  "hasMore": false
}
```
