API Reference
Public HTTP routes exposed by agtnames.com. These power the claim flow, agent directory, and configuration. For programmatic resolution of a .agt name, use the resolver SDK instead — it reads manifests directly from DNS without going through this site.
Routes
| Route | Method | Purpose |
|---|---|---|
/api/search | GET | Check name availability and pricing. Params: name. Rate limited (30 req/IP/min). Results cached for 45 seconds. |
/api/checkout | POST | Create a Stripe Checkout session with server-side price verification. Body: { domain, walletAddress, email?, termsAccepted } |
/api/checkout/status | GET | Poll fulfillment status after payment. Params: session_id. Returns fulfillment status, domain, wallet, and zone UUID. |
/api/claim/status | GET | Poll minting status on Polygon. Params: domain. Returns status (PENDING/IN_PROGRESS/COMPLETE/FAILED), transaction hash, token ID, and contract address. |
/api/agent-config | POST | Set agent configuration (agt-* TXT records). Body: { zoneUuid, config: { name, description, icon, website, protocols, capabilities, endpoints, pricing } } |
/api/agents | GET | Fetch agent manifests from the seed domain list. Filters: capability, protocol, q (text search). |
/api/webhooks/stripe | POST | Stripe webhook endpoint. Handles 6 event types: checkout completed/expired, dispute created/updated/closed, charge refunded. Auto-refunds on fulfillment failure. |
/api/admin/revenue | GET | Internal revenue reporting. Requires Authorization: Bearer {ADMIN_API_KEY}. Params: month, detail, months=all. |