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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Manage Domain

> Retrieve, update, or delete a domain by its ID, including details such as verification status, DNS records, and notification settings.

<!-- aisa-pricing:start -->
Published reference price: $0.012 USD per successful request. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->

## Request contract

* **Method and path:** PATCH /apis/v1/agentmail/domains/\{domain\_id}
* **Availability:** enabled
* **Request URL template:** [https://api.aisa.one/apis/v1/agentmail/domains/\&#123;domain\&#95;id\&#125](https://api.aisa.one/apis/v1/agentmail/domains/\&#123;domain\&#95;id\&#125);
* **domain\_id:** path; required
* **Runtime facts:** 18a04e28941fae19674c11246b677373368b6bd927b7c146220cec1f168f4639

[Complete OpenAPI definition](https://aisa.one/docs/openapi/agentmail.json)

Effective request and pricing declaration (including authentication and referenced schemas):

```json theme={null}
{
  "operationId": "patch_any_agentmail_apis_v1_agentmail_domains_domain_id",
  "method": "PATCH",
  "path": "/apis/v1/agentmail/domains/{domain_id}",
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ],
  "parameters": [
    {
      "in": "path",
      "name": "domain_id",
      "required": true,
      "schema": {
        "description": "The ID of the domain.",
        "title": "DomainId",
        "type": "string"
      }
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "description": "Provide at least one of `feedback_enabled`, `inbound_enabled`,\n`subdomains_enabled`, or `tracking_enabled`. Omitted fields are left\nunchanged; an empty body is rejected. Enabling `inbound_enabled` or\n`subdomains_enabled` on a verified domain returns it to `PENDING` until the\nnewly required MX record (the apex MX, or the wildcard `*.<domain>`) is\npublished and verified.",
          "properties": {
            "feedback_enabled": {
              "description": "Bounce and complaint notifications are sent to your inboxes.",
              "title": "FeedbackEnabled",
              "type": "boolean"
            },
            "inbound_enabled": {
              "description": "Receive email for this domain. Defaults to `true`. Set `false` for a send-only\ndomain: the apex MX record is not required and is omitted from `records`, so the\ndomain's existing email provider keeps receiving its mail. Inboxes on a send-only\ndomain can still send.",
              "title": "InboundEnabled",
              "type": "boolean"
            },
            "subdomains_enabled": {
              "description": "Allow inboxes on any subdomain of this domain. Adds a required wildcard MX\nrecord (`*.<domain>`) to `records`.",
              "title": "SubdomainsEnabled",
              "type": "boolean"
            },
            "tracking_enabled": {
              "description": "Serve open tracking pixels from this domain. Adds a required `link.<domain>`\nCNAME record to `records`, which must be published and verified before\n`track_opens` can be used on a send.",
              "title": "TrackingEnabled",
              "type": "boolean"
            }
          },
          "title": "UpdateDomainRequest",
          "type": "object"
        }
      }
    }
  },
  "x-aisa-status": "enabled",
  "x-aisa-pricing": {
    "cost_contract": "explicit_zero",
    "customer_pricing": "fixed_success",
    "default_request_estimate_usd": 0.012,
    "estimate_source": "profile_seed",
    "evidence_source": "request_snapshot"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```

## Cost and request rules

Published reference price: \$0.012 USD per successful request. Account-specific pricing and final settlement may differ.

Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.

* **Default request reference estimate (USD):** 0.012
* **Cost contract:** explicit\_zero
* **Settlement evidence source:** request\_snapshot


## OpenAPI

````yaml openapi/agentmail.json PATCH /apis/v1/agentmail/domains/{domain_id}
openapi: 3.1.0
info:
  description: ''
  title: AgentMail API
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    agentmail:
      description: ''
      title: AgentMail API
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: 18a04e28941fae19674c11246b677373368b6bd927b7c146220cec1f168f4639
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/agentmail/api-keys
    - /apis/v1/agentmail/api-keys/{api_key_id}
    - /apis/v1/agentmail/domains
    - /apis/v1/agentmail/domains/{domain_id}
    - /apis/v1/agentmail/domains/{domain_id}/verify
    - /apis/v1/agentmail/domains/{domain_id}/zone-file
    - /apis/v1/agentmail/drafts
    - /apis/v1/agentmail/drafts/{draft_id}
    - /apis/v1/agentmail/drafts/{draft_id}/attachments/{attachment_id}
    - /apis/v1/agentmail/inboxes
    - /apis/v1/agentmail/inboxes/{inbox_id}
    - /apis/v1/agentmail/inboxes/{inbox_id}/api-keys
    - /apis/v1/agentmail/inboxes/{inbox_id}/api-keys/{api_key_id}
    - /apis/v1/agentmail/inboxes/{inbox_id}/drafts
    - /apis/v1/agentmail/inboxes/{inbox_id}/drafts/{draft_id}
    - >-
      /apis/v1/agentmail/inboxes/{inbox_id}/drafts/{draft_id}/attachments/{attachment_id}
    - /apis/v1/agentmail/inboxes/{inbox_id}/drafts/{draft_id}/send
    - /apis/v1/agentmail/inboxes/{inbox_id}/events
    - /apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}
    - /apis/v1/agentmail/inboxes/{inbox_id}/lists/{direction}/{type}/{entry}
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages/send
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}
    - >-
      /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}/forward
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}/raw
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}/reply
    - /apis/v1/agentmail/inboxes/{inbox_id}/messages/{message_id}/reply-all
    - /apis/v1/agentmail/inboxes/{inbox_id}/metrics
    - /apis/v1/agentmail/inboxes/{inbox_id}/threads
    - /apis/v1/agentmail/inboxes/{inbox_id}/threads/{thread_id}
    - >-
      /apis/v1/agentmail/inboxes/{inbox_id}/threads/{thread_id}/attachments/{attachment_id}
    - /apis/v1/agentmail/lists/{direction}/{type}
    - /apis/v1/agentmail/lists/{direction}/{type}/{entry}
    - /apis/v1/agentmail/metrics
    - /apis/v1/agentmail/threads
    - /apis/v1/agentmail/threads/{thread_id}
    - /apis/v1/agentmail/threads/{thread_id}/attachments/{attachment_id}
  x-aisa-document:
    composer_version: '26'
    document_hash: sha256:cc7bbc22d6f57ece7bbb56529b01d9eda2bc52e979a788ffbd60352930970089
    facts_hash: 18a04e28941fae19674c11246b677373368b6bd927b7c146220cec1f168f4639
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: agentmail
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/agentmail/domains/{domain_id}:
    patch:
      tags:
        - default
      summary: Manage Domain
      description: >-
        Retrieve, update, or delete a domain by its ID, including details such
        as verification status, DNS records, and notification settings.


        <!-- aisa-pricing:start -->

        Published reference price: $0.012 USD per successful request.
        Account-specific pricing and final settlement may differ.

        <!-- aisa-pricing:end -->
      operationId: patch_any_agentmail_apis_v1_agentmail_domains_domain_id
      parameters:
        - in: path
          name: domain_id
          required: true
          schema:
            description: The ID of the domain.
            title: DomainId
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: >-
                Provide at least one of `feedback_enabled`, `inbound_enabled`,

                `subdomains_enabled`, or `tracking_enabled`. Omitted fields are
                left

                unchanged; an empty body is rejected. Enabling `inbound_enabled`
                or

                `subdomains_enabled` on a verified domain returns it to
                `PENDING` until the

                newly required MX record (the apex MX, or the wildcard
                `*.<domain>`) is

                published and verified.
              properties:
                feedback_enabled:
                  description: Bounce and complaint notifications are sent to your inboxes.
                  title: FeedbackEnabled
                  type: boolean
                inbound_enabled:
                  description: >-
                    Receive email for this domain. Defaults to `true`. Set
                    `false` for a send-only

                    domain: the apex MX record is not required and is omitted
                    from `records`, so the

                    domain's existing email provider keeps receiving its mail.
                    Inboxes on a send-only

                    domain can still send.
                  title: InboundEnabled
                  type: boolean
                subdomains_enabled:
                  description: >-
                    Allow inboxes on any subdomain of this domain. Adds a
                    required wildcard MX

                    record (`*.<domain>`) to `records`.
                  title: SubdomainsEnabled
                  type: boolean
                tracking_enabled:
                  description: >-
                    Serve open tracking pixels from this domain. Adds a required
                    `link.<domain>`

                    CNAME record to `records`, which must be published and
                    verified before

                    `track_opens` can be used on a send.
                  title: TrackingEnabled
                  type: boolean
              title: UpdateDomainRequest
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseD09F9471A0E8_domains_Domain'
          description: Response with status 200
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  schemas:
    ResponseD09F9471A0E8_domains_Domain:
      properties:
        client_id:
          $ref: '#/components/schemas/ResponseD09F9471A0E8_domains_ClientId'
        created_at:
          description: Time at which the domain was created.
          format: date-time
          type: string
        domain:
          $ref: '#/components/schemas/ResponseD09F9471A0E8_domains_DomainName'
        domain_id:
          $ref: '#/components/schemas/ResponseD09F9471A0E8_domains_DomainId'
        feedback_enabled:
          $ref: '#/components/schemas/ResponseD09F9471A0E8_domains_FeedbackEnabled'
        inbound_enabled:
          $ref: '#/components/schemas/ResponseD09F9471A0E8_domains_InboundEnabled'
          description: >-
            Absent on domains created before this field existed; those receive
            email.
        pod_id:
          $ref: '#/components/schemas/ResponseD09F9471A0E8_pods_PodId'
        reason:
          description: >-
            Why the domain is not (yet) VERIFIED, when known.
            `dns_records_missing` / `dns_records_invalid` point at the DNS
            records. The `ses_*` values mean the records look right and
            sending-infrastructure validation has not converged:
            `ses_dkim_pending` / `ses_mail_from_pending` (still checking),
            `ses_dkim_temporary_failure` / `ses_mail_from_temporary_failure` (a
            transient error the infrastructure keeps retrying on its own —
            usually resolves without changes), `ses_dkim_failed` /
            `ses_mail_from_failed` (a terminal verdict; re-verify after fixing),
            `ses_dkim_not_started` / `ses_mail_from_not_started` (the attribute
            was never configured on the identity — re-verify to push it), and
            `ses_not_verified_for_sending`. Absent when VERIFIED.
          type: string
        records:
          description: >-
            A list of DNS records required to verify the domain. Includes the
            apex

            MX record unless `inbound_enabled` is false, and a wildcard MX
            record

            (`*.<domain>`) when `subdomains_enabled` is true.
          items:
            $ref: >-
              #/components/schemas/ResponseD09F9471A0E8_domains_VerificationRecord
          type: array
        status:
          $ref: '#/components/schemas/ResponseD09F9471A0E8_domains_Status'
        subdomains_enabled:
          $ref: '#/components/schemas/ResponseD09F9471A0E8_domains_SubdomainsEnabled'
        tracking_enabled:
          $ref: '#/components/schemas/ResponseD09F9471A0E8_domains_TrackingEnabled'
        updated_at:
          description: Time at which the domain was last updated.
          format: date-time
          type: string
      required:
        - domain_id
        - domain
        - status
        - feedback_enabled
        - subdomains_enabled
        - tracking_enabled
        - records
        - updated_at
        - created_at
      title: Domain
      type: object
    ResponseD09F9471A0E8_domains_ClientId:
      description: Client ID of domain.
      title: ClientId
      type: string
    ResponseD09F9471A0E8_domains_DomainName:
      description: The name of the domain (e.g., `example.com`).
      title: DomainName
      type: string
    ResponseD09F9471A0E8_domains_DomainId:
      description: The ID of the domain.
      title: DomainId
      type: string
    ResponseD09F9471A0E8_domains_FeedbackEnabled:
      description: Bounce and complaint notifications are sent to your inboxes.
      title: FeedbackEnabled
      type: boolean
    ResponseD09F9471A0E8_domains_InboundEnabled:
      description: >-
        Receive email for this domain. Defaults to `true`. Set `false` for a
        send-only

        domain: the apex MX record is not required and is omitted from
        `records`, so the

        domain's existing email provider keeps receiving its mail. Inboxes on a
        send-only

        domain can still send.
      title: InboundEnabled
      type: boolean
    ResponseD09F9471A0E8_pods_PodId:
      description: ID of pod.
      title: PodId
      type: string
    ResponseD09F9471A0E8_domains_VerificationRecord:
      properties:
        name:
          description: The name or host of the record.
          type: string
        priority:
          description: The priority of the MX record.
          type: integer
        reason:
          description: >-
            Why the record is INVALID, when known. `duplicate_records` means the
            expected value is present but extra records coexist at the same
            name; `value_mismatch` means a record exists but does not match the
            expected value.
          type: string
        status:
          $ref: '#/components/schemas/ResponseD09F9471A0E8_domains_RecordStatus'
          description: The verification status of this specific record.
        type:
          $ref: '#/components/schemas/ResponseD09F9471A0E8_domains_RecordType'
          description: The type of the DNS record.
        value:
          description: The value of the record.
          type: string
      required:
        - type
        - name
        - value
        - status
      title: VerificationRecord
      type: object
    ResponseD09F9471A0E8_domains_Status:
      $ref: '#/components/schemas/ResponseD09F9471A0E8_domains_VerificationStatus'
      description: The verification status of the domain.
      title: Status
    ResponseD09F9471A0E8_domains_SubdomainsEnabled:
      description: >-
        Allow inboxes on any subdomain of this domain. Adds a required wildcard
        MX

        record (`*.<domain>`) to `records`.
      title: SubdomainsEnabled
      type: boolean
    ResponseD09F9471A0E8_domains_TrackingEnabled:
      description: >-
        Serve open tracking pixels from this domain. Adds a required
        `link.<domain>`

        CNAME record to `records`, which must be published and verified before

        `track_opens` can be used on a send.
      title: TrackingEnabled
      type: boolean
    ResponseD09F9471A0E8_domains_RecordStatus:
      enum:
        - MISSING
        - INVALID
        - VALID
      title: RecordStatus
      type: string
    ResponseD09F9471A0E8_domains_RecordType:
      enum:
        - TXT
        - CNAME
        - MX
      title: RecordType
      type: string
    ResponseD09F9471A0E8_domains_VerificationStatus:
      enum:
        - NOT_STARTED
        - PENDING
        - INVALID
        - FAILED
        - VERIFYING
        - VERIFIED
      title: VerificationStatus
      type: string
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.