---
title: "Get domain diagnostics"
method: GET
path: "/v1/domains/{domainId}/diagnostics"
tags: ["Domains"]
---

# Get domain diagnostics

`GET /v1/domains/{domainId}/diagnostics`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/domains/{domainId}/diagnostics`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.spacefast.com/v1/auth/oauth2/authorize`, token URL `https://api.spacefast.com/v1/auth/oauth2/token`; client credentials, token URL `https://api.spacefast.com/v1/auth/oauth2/token`, scopes: `domains:read`)

Returns DNS observations, setup instructions, and SSL state for one of your domains.

## Path parameters

- `domainId` string, required

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` object, required
    - `domainId` string, required: Domain inventory record (`dom_...`).
    - `hostname` string, required: Configured hostname.
    - `diagnostics` object[]: Domain-level setup nudges computed at read time, for example "companion_hostname_unbound" when the apex/www pair is half-bound.
      - `code` string, required: Stable snake_case diagnostic code naming the public contract that produced it.
      - `severity` 'info' | 'warning' | 'error', required: How actionable the diagnostic is.
      - `message` string, required: Human-readable explanation with enough detail to act on.
      - `path` string, nullable: Artifact path the diagnostic points at, for example "_headers:12", when one exists.
      - `provider` 'infra' | 'dns' | 'registrar' | 'runtime', nullable: Upstream system the diagnostic originated from, when not Spacefast itself.
      - `details` object, nullable: Machine-readable context for the diagnostic code.
      - `fix` string, nullable: Concrete, agent-actionable remediation hint, when one can be derived.
      - `retryable` boolean, nullable: Whether retrying the same operation can resolve this diagnostic without the caller changing anything.
    - `hostnameDiagnostics` object[], required: Per-hostname DNS and SSL connectivity diagnostics.
      - `hostname` string, required: Hostname this diagnostic block describes.
      - `purpose` 'apex' | 'www' | 'configured', required: Why this hostname is checked: the apex, its www twin, or the configured name.
      - `isConfiguredHostname` boolean, required: Whether this is the hostname on the domain record.
      - `providerIps` string[], required: Provider IPs the hostname should point at.
      - `verificationCode` string, nullable, required: Expected TXT verification value.
      - `dnsInstructions` object[], required: DNS records required for this hostname.
        - `type` 'A' | 'AAAA' | 'CNAME' | 'TXT' | 'ALIAS', required
        - `name` string, required: Record name to create, relative to the zone.
        - `value` string, required: Exact record value to set.
        - `ttl` integer
        - `purpose` 'verification' | 'routing' | 'ssl', required: Why this record is needed.
      - `dns` object, required
        - `observedAt` string, date-time, required
        - `expectedTxtValue` string, nullable, required
        - `pointsToProvider` boolean, required: Whether every provider-supported address family points at the provider.
        - `proxyDetected` boolean, nullable, required: Whether observed A records look proxied.
        - `txtVerified` boolean, nullable, required: Whether the verification TXT is observed.
        - `hasAaaaRecords` boolean, required
        - `hasCaaRecords` boolean, required
        - `records` object, required
          - `a` string[], required
          - `aaaa` string[], required
          - `caa` string[], required
          - `cname` string[], required
          - `txt` string[], required
        - `byResolver` object[], required
          - `resolver` string, required: Public resolver the snapshot was taken from.
          - `a` string[], required
          - `aaaa` string[], required
          - `caa` string[], required
          - `cname` string[], required
          - `txt` string[], required
      - `ssl` object, required
        - `status` 'missing' | 'pending' | 'active' | 'broken', required: Certificate state.
        - `canRetry` boolean, required: Whether SSL provisioning can be retried now.
        - `certificateId` string, nullable, required
        - `validationExpiration` string, nullable, required
        - `authzUri` string, nullable, required
        - `brokenRecord` object, nullable, required
          - `reason` string, nullable, required
          - `lastError` string, nullable, required
          - `retryDate` string, nullable, required
          - `failCount` integer, nullable, required

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

[API](https://skmtc.dev/spacefast/apis/spacefast-api.md) · [All operations](https://skmtc.dev/spacefast/apis/spacefast-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spacefast/apis/spacefast-api/revisions/bd165bc7c983?raw)
