Verify a domain
Check a domain's DNS records now.
POST /organizations/{org}/domains/{domainId}/verify
Looks up the domain’s TXT and routing records right away and returns the domain along with what was found, so you can see which record is missing.
Authorization
Org owner. Anyone else gets 403 forbidden.
Path parameters
| Name | Type | Description |
|---|---|---|
org | string | The organization: its id (org_…) or its slug. It has to be an org your token can manage (see Who can call it) |
domainId | string | The domain, dom_… |
No body.
Response
200 OK with the domain plus a check object.
{
"id": "dom_65f1c2a9e4b0d3f7a1c8e907",
"hostname": "login.acme.com",
"status": "pending",
"verified_at": null,
"created_at": "2026-10-18T09:12:00.000Z",
"records": {
"txt": { "name": "…", "value": "…" },
"cname": { "name": "login.acme.com", "value": "…" }
},
"check": {
"txt_found": [],
"routing": { "ok": false, "expected": ["…"], "found": [] }
}
}
| Field | Type | Description |
|---|---|---|
id | string | dom_… |
hostname | string | |
status | pending | verified | |
verified_at | ISO date | null | |
created_at | ISO date | |
records | object | { txt: { name, value }, cname: { name, value } }: the two DNS records to create |
check.txt_found | string[] | The TXT values found |
check.routing | object | { ok, expected: string[], found: string[] } |
Errors
| Status | error | When |
|---|---|---|
403 | forbidden | You are not an owner of the org |
404 | not_found | No such domain in this org, or the id is not a dom_ id |
409 | conflict | Another org has already verified that domain |
404 | not_found | The org does not exist, or your token cannot manage it |
Example
curl -X POST https://loginwith.loginwith.dev/organizations/acme/domains/dom_65f1c2a9e4b0d3f7a1c8e907/verify \
-H "Authorization: Bearer $TOKEN"