Purchase one or more domains
Purchases one or more domains and registers them immediately. Send {"domain": "..."} for single or {"domains": ["...", "..."]} for bulk (max 10).
If the domain is listed for sale on the Domani marketplace, this endpoint automatically routes to a marketplace purchase instead of a fresh registration. The response includes years: 0 and marketplace_purchase: true to distinguish it from a registration. Marketplace purchases are single-domain only. The buyer pays the full listed price; the seller receives the price minus a platform commission (default 10%).
Bulk purchases process each domain independently - failures don't block other purchases. The response includes results (succeeded), errors (failed), and summary with counts.
Accepts three payment methods:
- Card (default): Requires a card on file via POST /api/billing/setup. Charged per domain.
- USDC (two-step): First call without payment to get a 402 with payment_options.crypto (wallet address, amount, chains). Send USDC on-chain, then retry with payment_tx and payment_chain in the request body.
- x402 USDC (atomic): Include a PAYMENT-SIGNATURE header with a signed USDC payment on Base.
Bulk purchases require a card on file (USDC not supported for multi-domain). If no payment is provided for single domain, returns HTTP 402 with payment instructions.
Request
- Base URL: https://domani.run
- URL: https://domani.run/api/domains/buy
- Auth: HTTP bearer
Headers
Base64-encoded x402 payment payload (USDC on Base). When provided, the domain is paid with USDC instead of a card. x402-compatible clients handle this automatically after receiving a 402 response.
Request body
Example request
{
"domain": "mysite.com",
"domains": [
"mysite.com",
"mysite.dev"
],
"max_price": 20
}Response
Domain purchased and registered successfully
Changes
No recorded changes to this operation across all 2 revisions of this API.