# 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 { MailBlastr } from 'mailblastr';

const mb = new MailBlastr('mb_xxxxxxxxx');

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

**Ruby**

```ruby
require "mailblastr"

Mailblastr.api_key = "mb_xxxxxxxxx"

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

**PHP**

```php
$mailblastr = Mailblastr::client('mb_xxxxxxxxx');

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

**Python**

```python
import mailblastr

mailblastr.api_key = "mb_xxxxxxxxx"

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

**Go**

```go
client := mailblastr.NewClient("mb_xxxxxxxxx")
verified, err := client.Domains.Verify("DOMAIN_ID")
```

**Rust**

```rust
let mb = Mailblastr::new("mb_xxxxxxxxx");
let _verified = mb.domains.verify("DOMAIN_ID").await?;
```

**Java**

```java
Mailblastr mailblastr = new Mailblastr("mb_xxxxxxxxx");
mailblastr.domains().verify("DOMAIN_ID");
```

**.NET**

```csharp
IMailblastr mailblastr = MailblastrClient.Create("mb_xxxxxxxxx");
var resp = await mailblastr.DomainVerifyAsync("DOMAIN_ID");
```

**cURL**

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

**CLI**

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

Response — a slim acknowledgement. Fetch the domain with [`GET /domains/:id`](https://www.mailblastr.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, `invalid_access` if the key lacks full access. See [Errors](https://www.mailblastr.com/docs/api/errors).
