# Liste der Domains

> Alle Domänen im Arbeitsbereich.

`GET /domains`

Returns every domain with its status and records.

## Example

cURL

```
curl -X GET 'https://sendtern.com/domains' \
  -H 'Authorization: Bearer st_your_api_key'
```

Node.js

```
const res = await fetch("https://sendtern.com/domains", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.SENDTERN_API_KEY}`,
  },
});

const data = await res.json();
```

Python

```
import os
import requests

res = requests.get(
    "https://sendtern.com/domains",
    headers={"Authorization": f"Bearer {os.environ['SENDTERN_API_KEY']}"},
)

print(res.json())
```

## Response

```json
[
  {
    "id": "47be30ca-24b7-48fb-b35d-ff287b89e66d",
    "name": "mail.example.com",
    "status": "pending",
    "records": [
      {
        "type": "TXT",
        "name": "_sendtern.mail.example.com",
        "value": "sendtern-verification=example-token",
        "status": "pending"
      }
    ]
  }
]
```
