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

# Diagnose custom domain DNS

> Verify DNS records for custom domain configuration. Checks CNAME pointing to CVM, TXT records for app verification, and CAA records.



## OpenAPI

````yaml /openapi.json post /api/v1/cvms/{cvm_id}/customize-domain-diagnose
openapi: 3.1.0
info:
  title: Phala Cloud API
  version: 0.1.0
servers:
  - url: https://cloud-api.phala.com
security: []
tags:
  - name: CVMs
    description: Confidential Virtual Machine (CVM) lifecycle management on Phala Network
  - name: Apps
    description: App template management and CVM deployment from app blueprints
  - name: Webhooks
    description: Manage webhook endpoints and monitor delivery history
  - name: SSH Keys
    description: SSH public key management for CVM access
  - name: KMS
    description: >-
      Key Management Service — key derivation, on-chain anchoring, and
      inspection
  - name: Instance Types
    description: Available hardware configurations for CVM deployment
  - name: Attestations
    description: Remote attestation and TEE verification endpoints
paths:
  /api/v1/cvms/{cvm_id}/customize-domain-diagnose:
    post:
      tags:
        - CVMs
      summary: Diagnose custom domain DNS
      description: >-
        Verify DNS records for custom domain configuration. Checks CNAME
        pointing to CVM, TXT records for app verification, and CAA records.
      operationId: >-
        diagnose_custom_domains_api_v1_cvms__cvm_id__customize_domain_diagnose_post
      parameters:
        - name: cvm_id
          in: path
          required: true
          schema:
            type: string
            title: Cvm Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiagnoseDomainsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiagnosisResponse'
        '400':
          description: Invalid request or multiple CVMs with same name
        '401':
          description: Not authenticated
        '403':
          description: No access to this CVM
        '404':
          description: CVM not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DiagnoseDomainsRequest:
      properties:
        domains:
          items:
            $ref: '#/components/schemas/DomainCheckRequest'
          type: array
          title: Domains
          description: List of domain and port pairs to check
      type: object
      required:
        - domains
      title: DiagnoseDomainsRequest
      description: Request for diagnosing custom domain DNS configuration.
    DiagnosisResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/DomainDiagnosisResult'
          type: array
          title: Results
          description: Diagnosis results in request order
      type: object
      required:
        - results
      title: DiagnosisResponse
      description: Response containing diagnosis results for all requested domains.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DomainCheckRequest:
      properties:
        domain:
          type: string
          title: Domain
          description: Domain name to diagnose (e.g., app.example.com)
        port:
          type: integer
          title: Port
          description: Port number the domain routes to
      type: object
      required:
        - domain
        - port
      title: DomainCheckRequest
      description: Single domain check entry.
    DomainDiagnosisResult:
      properties:
        domain:
          type: string
          title: Domain
          description: Domain name checked
        port:
          type: integer
          title: Port
          description: Port number checked
        records:
          items:
            $ref: '#/components/schemas/DnsRecordResult'
          type: array
          title: Records
          description: DNS record check results
        is_valid:
          type: boolean
          title: Is Valid
          description: True if all required records (CNAME, TXT) are correct
        caa_check:
          anyOf:
            - $ref: '#/components/schemas/CaaCheckResult'
            - type: 'null'
          description: CAA record check (informational only)
      type: object
      required:
        - domain
        - port
        - records
        - is_valid
      title: DomainDiagnosisResult
      description: Diagnosis result for a single domain.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    DnsRecordResult:
      properties:
        record_type:
          type: string
          title: Record Type
          description: 'Record type: CNAME or TXT'
        query_name:
          type: string
          title: Query Name
          description: Domain name queried
        expected_value:
          type: string
          title: Expected Value
          description: Expected record value
        actual_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Actual Value
          description: Actual value found, null if missing
        is_valid:
          type: boolean
          title: Is Valid
          description: True if actual matches expected
        is_deprecated:
          type: boolean
          title: Is Deprecated
          description: True if this record format is deprecated
          default: false
        warning_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Warning Message
          description: Deprecation or migration warning
      type: object
      required:
        - record_type
        - query_name
        - expected_value
        - is_valid
      title: DnsRecordResult
      description: DNS record check result.
    CaaCheckResult:
      properties:
        caa_records:
          items:
            type: string
          type: array
          title: Caa Records
          description: Raw CAA DNS records found
        accounturi:
          anyOf:
            - type: string
            - type: 'null'
          title: Accounturi
          description: Account URI extracted from CAA record
        acme_fetches:
          items:
            $ref: '#/components/schemas/AcmeFetchResult'
          type: array
          title: Acme Fetches
          description: ACME endpoint query attempts
        expected_uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Uri
          description: Expected URI from ACME account
        is_match:
          type: boolean
          title: Is Match
          description: True if CAA accounturi matches ACME account
        info_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Info Message
          description: Additional context or guidance
      type: object
      required:
        - caa_records
        - acme_fetches
        - is_match
      title: CaaCheckResult
      description: CAA record check result (informational, not required for validation).
    AcmeFetchResult:
      properties:
        url:
          type: string
          title: Url
          description: ACME endpoint URL queried
        http_ok:
          type: boolean
          title: Http Ok
          description: True if HTTP 200 response received
        uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Uri
          description: Account URI from response body
        status_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Status Code
          description: HTTP status code returned
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Error message if request failed
      type: object
      required:
        - url
        - http_ok
      title: AcmeFetchResult
      description: Result of an ACME account fetch attempt.

````