> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentpost.email/llms.txt
> Use this file to discover all available pages before exploring further.

# Domain Tools

> MCP tools for adding, verifying, listing, and removing custom domains.

## Domain statuses

| Status           | Description                                 | Can send email                   |
| ---------------- | ------------------------------------------- | -------------------------------- |
| `pending_dns`    | Domain added, DNS records not yet verified. | No                               |
| `pending_warmup` | DNS verified, warming up.                   | Yes (10/day limit)               |
| `active`         | Fully verified and warmed up.               | Yes (50/day limit, configurable) |
| `suspended`      | Sending suspended.                          | No                               |

***

## AddDomain

Adds a custom domain to your account. Returns the domain record with a verification token. DNS records are configured asynchronously — check the required records using `ListDomains` or `VerifyDomain` after a moment.

**Inputs**

<ParamField path="domain" type="string" required>
  The domain name to add (e.g., `"example.com"`). Must be a valid domain format, not a public email provider domain, and not already registered on AgentPost.
</ParamField>

**Output**

<ResponseField name="id" type="string">
  Unique identifier for the domain record.
</ResponseField>

<ResponseField name="domain" type="string">
  The domain name you added.
</ResponseField>

<ResponseField name="status" type="string">
  Initial domain status. Typically `"pending_dns"` immediately after adding.
</ResponseField>

<ResponseField name="verification_token" type="string">
  Token used to verify domain ownership via DNS.
</ResponseField>

<ResponseField name="message" type="string">
  A human-readable description of the next steps.
</ResponseField>

<Note>
  DNS records are set up asynchronously. Wait a moment after calling `AddDomain`, then call `VerifyDomain` to retrieve the required DNS records and check their status.
</Note>

***

## ListDomains

Lists all custom domains on your account with their verification status and sending capability.

**Inputs**

This tool takes no inputs.

**Output**

<ResponseField name="domain_count" type="integer">
  Total number of domains on your account.
</ResponseField>

<ResponseField name="domains" type="array">
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      Unique identifier for the domain record.
    </ResponseField>

    <ResponseField name="domain" type="string">
      The domain name.
    </ResponseField>

    <ResponseField name="status" type="string">
      Current domain status: `pending_dns`, `pending_warmup`, `active`, or `suspended`.
    </ResponseField>

    <ResponseField name="can_send" type="boolean">
      Whether mailboxes on this domain can currently send outbound email.
    </ResponseField>

    <ResponseField name="verified_at" type="string">
      ISO 8601 timestamp of when the domain passed DNS verification. `null` if not yet verified.
    </ResponseField>

    <ResponseField name="warmup_ends_at" type="string">
      ISO 8601 timestamp of when the warmup period ends. `null` if not in warmup.
    </ResponseField>

    <ResponseField name="daily_send_limit" type="integer">
      Maximum number of emails allowed per day.
    </ResponseField>

    <ResponseField name="sends_today" type="integer">
      Number of emails sent today.
    </ResponseField>

    <ResponseField name="dns_last_checked_at" type="string">
      ISO 8601 timestamp of the most recent DNS verification check.
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of when the domain was added.
    </ResponseField>
  </Expandable>
</ResponseField>

***

## VerifyDomain

Triggers a DNS verification check for a custom domain. Checks DKIM, SPF, and DMARC records against what the sending provider expects.

If all checks pass and the domain is in `pending_dns` status, the domain transitions to `pending_warmup` and a warmup period begins (default 72 hours).

You can call this tool multiple times to re-check DNS records.

**Inputs**

<ParamField path="domain" type="string" required>
  The domain name to verify (e.g., `"example.com"`). You must own this domain.
</ParamField>

**Output**

<ResponseField name="domain" type="string">
  The domain name that was checked.
</ResponseField>

<ResponseField name="status" type="string">
  Updated domain status after the verification attempt.
</ResponseField>

<ResponseField name="verification_passed" type="boolean">
  Whether all DNS checks passed.
</ResponseField>

<ResponseField name="verified_at" type="string">
  ISO 8601 timestamp of when the domain passed verification. `null` if verification has not passed yet.
</ResponseField>

<ResponseField name="warmup_ends_at" type="string">
  ISO 8601 timestamp of when the warmup period ends. `null` if not in warmup.
</ResponseField>

<ResponseField name="dns_checks" type="object">
  Results of individual DNS record checks. Includes results for DKIM, SPF, and DMARC records.
</ResponseField>

***

## RemoveDomain

Removes a custom domain from your account and from the sending provider. Mailboxes on the domain lose sending capability immediately.

<Warning>
  This action is irreversible. All mailboxes on the domain will lose sending capability. If the provider removal fails, the domain record is still deleted locally.
</Warning>

**Inputs**

<ParamField path="domain" type="string" required>
  The domain name to remove (e.g., `"example.com"`). You must own this domain.
</ParamField>

**Output**

<ResponseField name="deleted" type="boolean">
  Always `true` when the domain was successfully removed.
</ResponseField>

<ResponseField name="domain" type="string">
  The domain name that was removed.
</ResponseField>
