---
title: "Detect the session domain's DNS provider"
method: POST
path: "/api/v1/sessions/{token}/detect"
tags: ["Sessions"]
---

# Detect the session domain's DNS provider

`POST /api/v1/sessions/{token}/detect`

## Request

- Base URL: `https://app.dodomain.io`
- URL: `https://app.dodomain.io/api/v1/sessions/{token}/detect`
- Auth: none required

Runs provider detection for the session's domain and persists the resulting tier on the session. `zone` is the zone that OWNS the records (the registrable apex, or a delegated subzone when one exists) — that is the zone the end user opens at their provider, which is why the returned `guide` is written against it rather than against the subdomain being connected.

## Path parameters

- `token` string, required

## Response `200`

Success.

- DetectSessionResponse
  - `confidence` 'high' | 'medium' | 'low', required
  - `domainConnect` object, nullable, required
    - `providerId` string, required
    - `providerName` string, required
  - `domainConnectReady` boolean, required
  - `guide` object, required
    - `apexToken` '@' | '(blank)' | '%domain%', required
    - `dashboardUrl` string
    - `hostFormat` string, required
    - `label` string, required
    - `notes` string[]
    - `provider` string, required
    - `steps` string[], required
  - `label` string, required
  - `method` 'oauth' | 'domain-connect' | 'guided', required
  - `nameServers` string[], required
  - `provider` string, required
  - `tier` union, required
    - 1
    - 2
    - 3
  - `zone` string, required

## Other responses

- `400`: `400 invalid_request` — The request body or query failed schema validation, or a documented capability rule rejected it. `details` carries the field-level report when the failure came from schema validation.
- `404`: `404 not_found` — The addressed resource does not exist, or the caller does not own it — the two collapse to one status on purpose, so an id cannot be enumerated by a caller who does not own it.
- `410`: `410 expired` — The connect session's 24-hour lifetime has elapsed. Returned before any verification, metering, or webhook work happens.
- `429`: `429 rate_limited` — Rate limited. `Retry-After` (seconds) is set and `details.retryAfterSeconds` repeats it. Branch on `details.reason`: `request_rate` means the caller is calling too fast (`details.limit` carries the cap), `recently_checked` means this one connection was DNS-checked inside its cooldown.
- `500`: `500 internal` — An unhandled server-side failure. Reported to our error tracker; safe to retry.

---

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