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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Create domain

> Add a sending or receiving domain to Resend.

`resend.createDomain` adds a domain and returns the DNS records required for verification.

```ts automations/create-resend-domain.automation.ts theme={null}
import { automation } from "automate.ax"
import { resend } from "automate.ax/resend"

export default automation("Create Resend domain", () => {
  resend.createDomain({
    name: "example.com",
    region: "us-east-1",
    capabilities: { sending: "enabled", receiving: "disabled" },
  })
})
```

Optional fields configure a custom return path, tracking subdomain, click and open tracking, TLS policy, and sending or receiving capabilities. At least one capability must remain enabled. The returned domain includes its status, capabilities, region, and typed DNS records.
