# 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 { SendPing } from 'sendping';

const mb = new SendPing('mb_xxxxxxxxx');

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

**Ruby**

```ruby
require "sendping"

SendPing.api_key = "mb_xxxxxxxxx"

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

**PHP**

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

use SendPing\SendPing;

$sendping = SendPing::client('mb_xxxxxxxxx');

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

**Python**

```python
import sendping

sendping.api_key = "mb_xxxxxxxxx"

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

**Go**

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

client := sendping.NewClient("mb_xxxxxxxxx")

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

**Rust**

```rust
use sendping::SendPing;

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

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

**Java**

```java
import co.sendping.SendPing;
import co.sendping.SendPingResponse;

SendPing sendping = new SendPing("mb_xxxxxxxxx");

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

**.NET**

```csharp
using SendPing;

ISendPing sendping = SendPingClient.Create("mb_xxxxxxxxx");

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

**cURL**

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

**CLI**

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

Response — a slim acknowledgement. Fetch the domain with [`GET /domains/:id`](https://www.sendping.co/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.sendping.co/docs/api/errors).
