---
title: "Look up the TXT record now and mark the domain verified when it matches (owner/admin, session)"
method: POST
path: "/orgs/{orgId}/sso/domains/{domainId}/verify"
tags: ["Teams"]
---

# Look up the TXT record now and mark the domain verified when it matches (owner/admin, session)

`POST /orgs/{orgId}/sso/domains/{domainId}/verify`

## Request

- Base URL: `https://hostingsurge.com/api/v1`
- URL: `https://hostingsurge.com/api/v1/orgs/{orgId}/sso/domains/{domainId}/verify`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-hs_session`

## Path parameters

- `orgId` string, uuid, required
- `domainId` string, uuid, required

## Response `200`

Result

- object
  - `domain` object, required
    - `id` string, uuid, required
    - `domain` string, required
    - `status` 'verified' | 'pending', required
    - `verifiedAt` string, nullable, required: ISO-8601 timestamp
    - `lastCheckedAt` string, nullable, required: ISO-8601 timestamp
    - `createdAt` string, required: ISO-8601 timestamp
    - `verification` object, nullable, required: the DNS record that proves the domain; null when its key left the keyring (remove and add the domain again)
      - `type` 'TXT', required
      - `name` string, required
      - `value` string, required
  - `verified` boolean, required
  - `reason` string, nullable, required: why the TXT record did not match yet
  - `observed` string[], required: TXT values found at the record name (at most 5)

## Other responses

- `400`: Invalid request (code invalid_request; details.reason names a policy rule)
- `401`: Missing or invalid session/token (code unauthorized)
- `403`: Not permitted (code forbidden). details.sessionRequired: changes need a dashboard session; details.reauthenticate: sign in again (changes need a session younger than 5 minutes); details.policy: the team requires mfa/sso. Code ip_not_allowed: the team's IP allow-list does not include your address (details.clientIp)
- `404`: Not found or not visible to the caller (code not_found)
- `409`: Conflicts with the team state, e.g. the last owner (code conflict)
- `429`: Too many requests (code rate_limited); see Retry-After

---

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