GET /api/v1/domains
Every domain declared by the organization, with its verification status and the DNS records left
to publish. The records are never stored: they are read back from the provider on every call,
because they change if the identity is recreated.
Authorization
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Allowed |
Example
bash
curl -H "x-api-key: $AGENTMAIL_API_KEY" \
"https://www.agentsmail.io/api/v1/domains"Response
200 OK— the call succeeded.401 Unauthorized— missing or invalid key, or its owner left the organization.429 Too Many Requests— over 120 requests in a minute for this key.
Response fields
data is an array of:
verified answers the only question that matters. DKIM proves the domain can sign; the TXT
challenge proves this organization owns it. A domain can sit at dkimStatus: "SUCCESS" and
still block, with ownershipProved: false.| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the operation was successful |
data[].id | string | Identifier of the declared domain |
data[].domain | string | The domain itself |
data[].dkimStatus | string | PENDING, SUCCESS or FAILED — the signing keys |
data[].mailFromStatus | string \ | null |
data[].mailFromDomain | string \ | null |
data[].verified | boolean | The only question that decides sending: DKIM SUCCESS and ownership proved |
data[].ownershipProved | boolean | Which of the two gestures is still missing |
data[].lastCheckedAt | string \ | null |
data[].sesUnavailable | boolean | true means you are reading the last known state, not the current truth |
data[].dnsRecords | array | The records to publish — {type, name, value, purpose} |
pagination | object | {total, page, limit, totalPages} |
Example response
json
{
"success": true,
"data": [
{
"id": "b71f…",
"domain": "mail.example.com",
"dkimStatus": "SUCCESS",
"mailFromStatus": "SUCCESS",
"mailFromDomain": "bounce.mail.example.com",
"verified": true,
"ownershipProved": true,
"lastCheckedAt": "2026-08-23T09:41:02.000Z",
"sesUnavailable": false,
"dnsRecords": [
{"type": "CNAME", "name": "abc123._domainkey.mail.example.com", "value": "abc123.dkim.amazonses.com", "purpose": "dkim"},
{"type": "TXT", "name": "_agentmail-challenge.mail.example.com", "value": "agentmail-verify=9f2c…", "purpose": "ownership"}
]
}
]
}