---
search:
  tags:
    - Merchant Registry
    - POST
seo:
  description: >-
    Queries DoH (cloudflare-dns.com) for the TXT record. Returns… Reference for
    the POST /v1/merchants/{id}/verify-domain endpoint in the agentsub Gateway
    API.
sidebar:
  label: Verify merchant domain via DNS TXT
  badge: POST
title: Verify merchant domain via DNS TXT
type: openapi-operation
---
Queries DoH (`cloudflare-dns.com`) for the TXT record. Returns `409 domain_verification_pending` with the DNS record until propagation.

`POST /v1/merchants/{id}/verify-domain`

**Responses**

- `200` — Domain verified
- `401` — \`unauthorized\` problem; live 401s advertise \`WWW-Authenticate: Bearer resource\_metadata=...\`
- `403` — Identity, ownership, scope or policy denied (\`human\_required\`, \`owner\_claim\_required\`, \`scope\_required\`, \`FROZEN\`, \`CAP\_EXCEEDED\`, \`SCOPE\_FORBIDDEN\`)
- `409` — Verification pending
- `503` — Runtime or provider configuration unavailable (\`runtime\_configuration\_required\`, \`signing\_configuration\_required\`, \`runtime\_unavailable\`, \`workspace\_unavailable\`, \`provider\_configuration\_required\`)

Response example, 200:

```json
{
  "merchant": {
    "id": "string",
    "ownerId": "string",
    "name": "string",
    "domain": "string",
    "verificationChallenge": "string",
    "verified": true,
    "acceptedPaymentMethods": [
      "string"
    ],
    "webhookUrl": "string"
  },
  "verified": true
}
```
