---
title: "Create Domain"
method: POST
path: "/v0/domains"
tags: ["Domains"]
---

# Create Domain

`POST /v0/domains`

## Request

- Base URL: `https://api.agentmail.to`
- URL: `https://api.agentmail.to/v0/domains`
- Auth: HTTP bearer

**CLI:**
```bash
agentmail domains create --domain example.com
```

## Request body

- CreateDomainRequest
  - `domain` string, required: The name of the domain (e.g., `example.com`).
  - `feedback_enabled` boolean, required: Bounce and complaint notifications are sent to your inboxes.

## Response `200`

- Domain
  - `pod_id` string: ID of pod.
  - `domain_id` string, required: The ID of the domain.
  - `domain` string, required: The name of the domain (e.g., `example.com`).
  - `status` 'NOT_STARTED' | 'PENDING' | 'INVALID' | 'FAILED' | 'VERIFYING' | 'VERIFIED', required
  - `feedback_enabled` boolean, required: Bounce and complaint notifications are sent to your inboxes.
  - `records` VerificationRecord[], required: A list of DNS records required to verify the domain.
    - `type` 'TXT' | 'CNAME' | 'MX', required
    - `name` string, required: The name or host of the record.
    - `value` string, required: The value of the record.
    - `status` 'MISSING' | 'INVALID' | 'VALID', required
    - `priority` integer, nullable: The priority of the MX record.
  - `client_id` string: Client ID of domain.
  - `updated_at` string, date-time, required: Time at which the domain was last updated.
  - `created_at` string, date-time, required: Time at which the domain was created.

## Other responses

- `400`

---

[API](https://skmtc.dev/agentmail-to/apis/agentmail-cli-speakeasy-api.md) - [All operations](https://skmtc.dev/agentmail-to/apis/agentmail-cli-speakeasy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentmail-to/apis/agentmail-cli-speakeasy-api/revisions/869b7f1c360c?raw)
