List Domains
Retrieve all sending domains for the account.
GET /api/v1/domains
Returns all custom sending domains registered on the authenticated account. Authenticate with a JWT.
Response
Returns 200 OK with a domains array:
{
"domains": [
{
"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"
}
]
}Code examples
curl https://api.smail.dev/api/v1/domains \
-H "Authorization: Bearer eyJ..."const { domains } = await smail.domains.list();
for (const domain of domains) {
console.log(`${domain.domain} — ${domain.status}`);
}domains, err := client.Domains.List(ctx)
for _, d := range domains {
fmt.Printf("%s — %s\n", d.Domain, d.Status)
}Error responses
| Status | Error | Description |
|---|---|---|
401 | unauthorized | Missing or invalid JWT |