---
title: "Every domain of the workspace with its last drift check"
method: GET
path: "/monitor/domains"
tags: ["Monitor"]
---

# Every domain of the workspace with its last drift check

`GET /monitor/domains`

## Request

- Base URL: `https://api.customdomain.ai/v1`
- URL: `https://api.customdomain.ai/v1/monitor/domains`
- Auth: HTTP bearer

The monitoring state of the domains in the API key's workspace (or one application with `app_id`), the ones needing attention first, a page at a time, with counts over every domain. Pass the previous page's `next_cursor` as `cursor` for the next page; there is no `next_cursor` on the last one. The per domain detail (watched records, repair route, history) is on `GET /connections/{id}/monitor`.

## Query parameters

- `app_id` string
- `limit` integer
- `cursor` string

## Response `200`

One page of domains, and a summary of all of them

- object
  - `every` string, required
  - `auto_repair` boolean, required: Whether this deployment puts missing records back automatically (`MONITOR_AUTO_REPAIR`).
  - `next_cursor` string: Present when more domains follow; pass it as `cursor`.
  - `summary` object, required
    - `domains` integer
    - `watched` integer
    - `ok` integer
    - `drift` integer
    - `needs_action` integer
    - `inconclusive` integer
    - `unconfirmed` integer
    - `not_checked` integer
  - `domains` object[], required
    - `connection_id` string, required
    - `domain` string, required
    - `watched` boolean, required
    - `active` boolean, required
    - `every` string, required: How often the domain is checked (hour).
    - `last_checked_at` string, date-time, nullable, required
    - `next_check_at` string, date-time
    - `result` 'ok' | 'drift' | 'inconclusive' | 'unconfirmed' | 'not_checked' | 'not_watched', required: The last check. `drift` is only reported after a second, independent look at the zone's own nameservers confirmed it; `inconclusive` means the lookup did not answer and the previous finding stands; `unconfirmed` means the first lookup saw a change the zone's own nameservers could not be asked to confirm (see `reason`): earlier drift stands and nothing is restored.
    - `reason` 'ns_lookup_failed' | 'timeout' | 'all_servers_refused' | 'no_server_answered' | 'delegated' | 'unsupported_type': Set when `result` is `unconfirmed`, why the nameservers could not confirm.
    - `unconfirmed_checks` integer: Set when `result` is `unconfirmed`, how many checks in a row. At 3 the workspace gets one inbox entry.
    - `drift_since` string, date-time
    - `drift` DriftRecord[], required
      - `subdomain` string, required: The record's name relative to the domain ("@" for the domain itself).
      - `type` string, required
      - `verdict` 'record_missing' | 'record_changed', required
      - `expected` string[], required
      - `observed` string[]
    - `checked` integer, required: Records compared in the last check.
    - `error` string
    - `action` object: What was done about the drift: `auto_fixed` (put back), `fix_failed` (the repair failed, did not hold, or the records were put back 3 times in 24 hours and disappeared again) or `action_required` (left for the tenant).
      - `kind` 'auto_fixed' | 'fix_failed' | 'action_required'
      - `at` string, date-time
      - `description` string
    - `attention` 'action_required' | 'fix_failed' | 'drift': Set while drift needs the tenant (action_required, fix_failed) or is being repaired (drift).
    - `repair` object, required
      - `automatic` boolean, required: True when CustomDomain™ holds continuous access and puts disappeared records back itself.
      - `paused` boolean: True when CustomDomain™ holds the access (`via`) but this deployment has automatic repair switched off (`MONITOR_AUTO_REPAIR`): missing records are reported, not put back. Omitted otherwise.
      - `via` 'managed_dns' | 'sign_in' | 'domain_connect' | 'provider_account'
      - `detail` string, required
    - `alerts` object, required
      - `webhooks` boolean
      - `email` boolean
    - `watching` object[]: The records the domain is held to.
      - `name` string
      - `type` string
      - `value` string
    - `history` DomainEvent[]
      - `id` string, required
      - `application_id` string
      - `connection_id` string
      - `domain` string, required
      - `kind` string, required: One of connection.created, connection.applied, connection.live, connection.failed, connection.records.updated, connection.reapply.failed, connection.records_outdated, connection.disconnected, records.removed, records.rewritten, certificate.issued, certificate.renewed, certificate.failed, certificate.expiring, certificate.removed, drift.found, drift.fixed, drift.fix_failed, drift.action_required, drift.restored, access.granted, access.revoked, access.needs_reconnect. A connection or certificate kind that is also a webhook event type is written with the webhook, so the timeline and an integrator see the same history.
      - `detail` object
      - `created_at` string, date-time, required
    - `application_id` string
    - `status` string

## Other responses

- `400`: Error envelope: {code, title, details}.
- `401`: Error envelope: {code, title, details}.

---

[API](https://skmtc.dev/customdomain/apis/customdomain-control-plane-api.md) · [All operations](https://skmtc.dev/customdomain/apis/customdomain-control-plane-api/llms.txt) · [OpenAPI document](https://skmtc.dev/customdomain/apis/customdomain-control-plane-api/revisions/34d89cb7a7cd?raw)
