# AgentMail Get Domain Zone File

> AgentMail Get Domain Zone File is a free API for AI agents from x402.api.agentmail.to, callable via x402, Free, status unknown (last checked 2026-09-08).

Retrieves the DNS zone file for a specified AgentMail email domain

## Facts

- Endpoint: GET https://x402.api.agentmail.to/v0/domains/%7Bdomain_id%7D/zone-file
- Price: Free
- Payment: x402
- Status: unknown
- Last checked: 2026-09-08
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentmail-get-domain-zone-file-453e7b1f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u5TQRkr544pEf3K8hLITz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentmail-get-domain-zone-file-453e7b1f
```

Example prompt: Can you fetch the DNS zone file for my AgentMail domain with ID 'acme-corp-mail' so I can see the current DNS records configured for it?

## When to prefer this

Use this endpoint when you need to inspect or verify the DNS zone file configuration for a specific AgentMail-managed email domain, for example to confirm MX records are set correctly or to audit DNS settings for an agent inbox domain.

## Known failure modes

- Domain ID not found — returns 404 if the specified domain_id does not exist
- Unauthorized — returns 401 or 403 if the caller lacks permission to access this domain
- Invalid domain_id format — returns 400 for malformed path parameters
- Empty response if the domain has no zone file configured yet

## How this service works

AgentMail gives AI agents real email inboxes. Create, send, receive, and search messages via REST API — built for autonomous agents and agentic workflows.

## Output

Returns the DNS zone file for the specified domain, including DNS records such as MX, TXT, SPF, and other configuration entries that define how email is routed for that AgentMail domain.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "pathParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "domain_id"
     ],
     "properties": {
      "domain_id": {
       "type": "string"
      }
     },
     "additionalProperties": false
    },
    "queryParams": {
     "type": "object",
     "properties": {},
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "additionalProperties": true
    }
   },
   "additionalProperties": false
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentmail-get-domain-zone-file-453e7b1f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.api.agentmail.to](https://www.zero.xyz/host/x402.api.agentmail.to/llms.txt)
