# Verify a domain

> POST /domains/:id/verify — re-check DNS and update the domain status.

`POST /domains/:id/verify`

Re-checks the domain’s DNS and updates the domain’s `status` (and every record’s `status`) to `verified`, `failed`, or still `pending`. Call this after publishing your DNS records, or any time you want to refresh verification state. Requires a key with full access.

**Node.js**

```js
import { SendDart } from 'senddart';

const mb = new SendDart('mb_xxxxxxxxx');

const { data, error } = await mb.domains.verify('d91a7c4e-1f2b-4a8c-9e3d-7b5f0a2c1d6e');
console.log({ data, error });
```

**Ruby**

```ruby
require "senddart"

SendDart.api_key = "mb_xxxxxxxxx"

SendDart::Domains.verify("d91a7c4e-1f2b-4a8c-9e3d-7b5f0a2c1d6e")
```

**PHP**

```php
<?php
require 'vendor/autoload.php';

use SendDart\SendDart;

$senddart = SendDart::client('mb_xxxxxxxxx');

$senddart->domains->verify('d91a7c4e-1f2b-4a8c-9e3d-7b5f0a2c1d6e');
```

**Python**

```python
import senddart

senddart.api_key = "mb_xxxxxxxxx"

senddart.Domains.verify("d91a7c4e-1f2b-4a8c-9e3d-7b5f0a2c1d6e")
```

**Go**

```go
import "github.com/shekhu10/senddart-sdks/senddart-go"

client := senddart.NewClient("mb_xxxxxxxxx")

verified, err := client.Domains.Verify("d91a7c4e-1f2b-4a8c-9e3d-7b5f0a2c1d6e")
```

**Rust**

```rust
use senddart::SendDart;

let mb = SendDart::new("mb_xxxxxxxxx");

let _verified = mb.domains.verify("d91a7c4e-1f2b-4a8c-9e3d-7b5f0a2c1d6e").await?;
```

**Java**

```java
import com.senddart.SendDart;
import com.senddart.SendDartResponse;

SendDart senddart = new SendDart("mb_xxxxxxxxx");

SendDartResponse response = senddart.domains().verify("d91a7c4e-1f2b-4a8c-9e3d-7b5f0a2c1d6e");
```

**.NET**

```csharp
using SendDart;

ISendDart senddart = SendDartClient.Create("mb_xxxxxxxxx");

var resp = await senddart.DomainVerifyAsync("d91a7c4e-1f2b-4a8c-9e3d-7b5f0a2c1d6e");
```

**cURL**

```bash
curl -X POST 'https://www.senddart.com/api/domains/d91a7c4e-1f2b-4a8c-9e3d-7b5f0a2c1d6e/verify' \
  -H 'Authorization: Bearer mb_xxxxxxxxx'
```

**CLI**

```bash
senddart domains verify d91a7c4e-1f2b-4a8c-9e3d-7b5f0a2c1d6e
```

Response — a slim acknowledgement. Fetch the domain with [`GET /domains/:id`](https://www.senddart.com/docs/api/domains-get) to read the refreshed statuses:

```json
{
  "object": "domain",
  "id": "d91a7c4e-1f2b-4a8c-9e3d-7b5f0a2c1d6e"
}
```

> **Note:** DNS can take time to propagate. If the domain is still `pending`, wait a bit and call verify again.

Errors: `not_found` if the domain does not exist or is not yours, `restricted_api_key` if the key lacks full access. See [Errors](https://www.senddart.com/docs/api/errors).
