Verify Domain
Trigger a DNS check to verify domain ownership.
POST /api/v1/domains/:id/verify
Triggers a live DNS check to confirm the domain's records are correctly configured. On success, the domain status changes to "verified" and emails can be sent from addresses on this domain. Authenticate with a JWT.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The domain ID |
Response
Returns 200 OK with the updated domain and DNS records (same structure as Add Domain).
{
"domain": {
"id": "dom_abc123",
"domain": "yourdomain.com",
"status": "verified",
"dkim_selector": "smail1",
"verified_at": "2024-01-16T08:00:00Z",
"created_at": "2024-01-15T10:00:00Z"
},
"dns_records": { ... }
}Code examples
curl -X POST https://api.smail.dev/api/v1/domains/dom_abc123/verify \
-H "Authorization: Bearer eyJ..."const result = await smail.domains.verify("dom_abc123");
console.log("Status:", result.domain.status); // "verified"result, err := client.Domains.Verify(ctx, "dom_abc123")
if err != nil {
// error detail explains which DNS record is missing
log.Fatal(err)
}
fmt.Println("Status:", result.Domain.Status)Error responses
| Status | Error | Description |
|---|---|---|
401 | unauthorized | Missing or invalid JWT |
404 | not found | Domain ID does not exist |
400 | dns verification failed | DNS records not yet propagated — includes detail on which record is missing |