# Verify domain

> Check the DNS records now.

`POST /domains/:id/verify`

Looks up each record and updates its status. The domain becomes `verified` when ownership and, in SMTP mode, DKIM match.

## Path parameters

- `id` (string, required): The domain id, for example `47be30ca-24b7-48fb-b35d-ff287b89e66d`.

## Example

cURL

```
curl -X POST 'https://sendtern.com/domains/47be30ca-24b7-48fb-b35d-ff287b89e66d/verify' \
  -H 'Authorization: Bearer st_your_api_key'
```

Node.js

```
const res = await fetch("https://sendtern.com/domains/47be30ca-24b7-48fb-b35d-ff287b89e66d/verify", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SENDTERN_API_KEY}`,
  },
});

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

Python

```
import os
import requests

res = requests.post(
    "https://sendtern.com/domains/47be30ca-24b7-48fb-b35d-ff287b89e66d/verify",
    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"
    }
  ]
}
```
