{"openapi":"3.1.0","info":{"title":"Doma Domain Registration API","version":"1.0.0","description":"Register domain names (com, xyz, ai, io, net, cash, live, fyi) via the Machine Payments Protocol (MPP). Pricing is determined dynamically based on domain availability and TLD.","x-guidance":"Use POST /register with a JSON body to register a domain. The body must include domain (e.g. 'example.com'), buyerAddress (EVM 0x-prefixed address), and contact (object with registrant info). The endpoint returns a 402 Payment Required challenge on first call; your MPP client handles payment automatically and retries. Supported TLDs: com, xyz, ai, io, net, cash, live, fyi."},"servers":[{"url":"https://mpp.doma.xyz"}],"x-discovery":{"ownershipProofs":[]},"paths":{"/register":{"post":{"operationId":"registerDomain","summary":"Register a domain name via MPP payment","tags":["Domain Registration"],"x-payment-info":{"pricingMode":"quote","protocols":["mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Full domain name to register, including TLD (e.g. 'example.com'). Supported TLDs: com, xyz, ai, io, net, cash, live, fyi.","pattern":"^[a-zA-Z0-9-]+\\.(com|xyz|ai|io|net|cash|live|fyi)$"},"buyerAddress":{"type":"string","description":"EVM wallet address of the domain buyer (0x-prefixed, 40 hex characters).","pattern":"^0x[a-fA-F0-9]{40}$"},"contact":{"type":"object","description":"Registrant contact information.","properties":{"firstName":{"type":"string","description":"Registrant first name","example":"John"},"lastName":{"type":"string","description":"Registrant last name","example":"Doe"},"organization":{"type":"string","description":"Organization or company name","example":"Example Inc"},"email":{"type":"string","description":"Contact email address","example":"john.doe@example.com"},"phone":{"type":"string","description":"Phone number without country code","example":"4151234567"},"phoneCountryCode":{"type":"string","description":"Phone country code","example":"+1"},"fax":{"type":"string","description":"Fax number without country code","example":"4151234567"},"faxCountryCode":{"type":"string","description":"Fax country code","example":"+1"},"street":{"type":"string","description":"Street address","example":"1234 Market St"},"city":{"type":"string","description":"City","example":"San Francisco"},"state":{"type":"string","description":"State or province code","example":"CA"},"postalCode":{"type":"string","description":"Postal/ZIP code","example":"94103"},"countryCode":{"type":"string","description":"ISO 3166-1 alpha-2 country code","example":"US"}},"required":["firstName","lastName","email","phone","phoneCountryCode","street","city","state","postalCode","countryCode"]}},"required":["domain","buyerAddress","contact"]}}}},"responses":{"200":{"description":"Domain registration successful","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on success"},"domain":{"type":"string","description":"The registered domain name"},"network":{"type":"string","enum":["testnet","mainnet"],"description":"The network the registration was processed on"},"txHash":{"type":"string","description":"On-chain transaction hash of the payment"},"paymentContract":{"type":"string","description":"Address of the Interstellar payment contract"},"voucherAmount":{"type":"string","description":"Amount paid in wei"}},"required":["success","domain","network","txHash","paymentContract","voucherAmount"]}}}},"400":{"description":"Bad request — missing or invalid domain, buyerAddress, or contact parameters (including missing required contact fields)"},"402":{"description":"Payment Required"},"409":{"description":"Domain not available for registration"},"500":{"description":"Server error or on-chain transaction failure"}}}},"/buy":{"post":{"operationId":"buyDomain","summary":"Buy a listed Doma domain via MPP payment + Seaport","tags":["Domain Purchase"],"x-payment-info":{"pricingMode":"quote","protocols":["mpp"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"Full domain name to buy, including TLD (e.g. 'example.ai'). Must be a tokenized domain with at least one active USDC-priced Seaport listing on Doma chain."},"buyerAddress":{"type":"string","description":"EVM wallet address that will receive the domain NFT (0x-prefixed, 40 hex characters). Independent of the buyer's payment wallet.","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["domain","buyerAddress"]}}}},"responses":{"200":{"description":"Domain purchase successful — NFT delivered to buyerAddress","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Always true on success"},"domain":{"type":"string","description":"The purchased domain name"},"network":{"type":"string","enum":["testnet","mainnet"],"description":"The Doma network the purchase was processed on"},"txHash":{"type":"string","description":"Doma-chain transaction hash of the Seaport.fulfillAdvancedOrder call"},"buyerAddress":{"type":"string","description":"EVM address that received the NFT"},"listingPrice":{"type":"string","description":"Listing price in USDC (human-readable, e.g. '5.00')"},"currency":{"type":"string","description":"Payment currency symbol (USDC on mainnet, USDTEST on testnet)"},"orderId":{"type":"string","description":"Doma orderbook listing identifier that was fulfilled"},"tokenAddress":{"type":"string","description":"ERC-721 contract address of the domain token"},"tokenId":{"type":"string","description":"Token ID of the purchased NFT"}},"required":["success","domain","network","txHash","buyerAddress","listingPrice","currency","orderId","tokenAddress","tokenId"]}}}},"400":{"description":"Bad request — missing or invalid 'domain' or 'buyerAddress' parameters"},"402":{"description":"Payment Required — issued on first call with HMAC-locked listing price"},"404":{"description":"No active USDC-priced listing for the given domain"},"422":{"description":"Listing price exceeds MPP_MAX_LISTING_PRICE_USD safety cap"},"500":{"description":"Server error — listing cancelled mid-flow, Seaport revert, or operator wallet issue"}}}}}}