Get Domain
Retrieve a single domain and its DNS records.
GET /api/v1/domains/:id
Returns a single domain by ID, including the DNS records needed for verification. Authenticate with a JWT.
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The domain ID |
Response
Returns 200 OK with the same structure as Add Domain — a domain object and dns_records.
Code examples
curl https://api.smail.dev/api/v1/domains/dom_abc123 \
-H "Authorization: Bearer eyJ..."const result = await smail.domains.get("dom_abc123");
console.log("Status:", result.domain.status);result, err := client.Domains.Get(ctx, "dom_abc123")
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 or belongs to another account |