Skip to content
Go To Dashboard

Domains & DNS

Search domain availability, register names, renew registrations, and manage DNS records — all through a single gateway backed by Name.com. No Name.com account required, pay only for what you register. DNS management is free.

Domains & DNS isn’t in the typed ctx.sapiom.* client yet (it’s being ported) — call its REST API with the SDK (@sapiom/fetch) from step code, as in the Quick Example. See Using Capabilities.

import { createFetch } from "@sapiom/fetch";
const sapiomFetch = createFetch({
apiKey: process.env.SAPIOM_API_KEY,
agentName: "my-agent",
});
const baseUrl = "https://namecom.services.sapiom.ai";
// 1. Check availability (free)
const searchRes = await sapiomFetch(`${baseUrl}/v1/domains/check`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ domainNames: ["myproject.com", "myproject.io"] }),
});
const { results } = await searchRes.json();
// results[0] = { domainName: "myproject.com", purchasable: true, purchasePrice: 12.99, ... }
// 2. Register the domain (paid — price is TLD-dependent, billed at Name.com's live price)
const buyRes = await sapiomFetch(`${baseUrl}/v1/domains`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ domainName: "myproject.com" }),
});
const domain = await buyRes.json();
console.log(domain.domainName); // "myproject.com"
console.log(domain.expireDate); // "2027-06-25T00:00:00.000Z"

Requests are proxied synchronously through the Sapiom gateway (https://namecom.services.sapiom.ai) to Name.com. All nine routes carry @X402Payment — the Sapiom SDK negotiates the micropayment automatically. Search, list, get, and all DNS operations are free for an identified caller; registration and renewal carry a dynamic fee.

Dynamic TLD pricing: Domain purchase and renewal prices are not fixed — they depend on the TLD and are resolved in real time from Name.com at payment time. The availability search response (purchasePrice, renewalPrice) gives you the current price before you commit. If the price at Name.com changes between your search and your buy/renew call, the gateway returns 400 — retry the search to get the updated price and re-submit.

Registration flow: sapiom_domains_buy executes a synchronous 3-step transaction (reserve → charge → register with Name.com). The domain is live on completion. Privacy protection is enabled by default; auto-renew is off by default.

60-day ICANN transfer lock: A domain registered through this gateway cannot be transferred out for 60 days after purchase — this is an ICANN policy, not a Sapiom restriction.

Powered by Name.com. Name.com is an ICANN-accredited registrar providing domain registration, renewal, and DNS management.

Base URL: https://namecom.services.sapiom.ai

MethodPathToolPricing
POST/v1/domains/checksapiom_domains_searchFree
POST/v1/domainssapiom_domains_buyPaid — TLD-dependent
POST/v1/domains/:name/renewsapiom_domains_renewPaid — TLD-dependent
GET/v1/domainssapiom_domains_listFree
GET/v1/domains/:namesapiom_domains_getFree
POST/v1/domains/:name/recordssapiom_dns_create_recordFree
GET/v1/domains/:name/recordssapiom_dns_list_recordsFree
PUT/v1/domains/:name/records/:idsapiom_dns_update_recordFree
DELETE/v1/domains/:name/records/:idsapiom_dns_delete_recordFree

Endpoint: POST https://namecom.services.sapiom.ai/v1/domains/check

Check the availability and current purchase/renewal price for up to 50 domain names. Free — no charge for searching.

ParameterTypeRequiredDescription
domainNamesstring[]YesList of domain names to check (1–50), e.g. ["example.com", "example.io"]
agentNamestringNoAgent name for spend attribution
{
"results": [
{
"domainName": "example.com",
"purchasable": false,
"purchasePrice": 12.99,
"purchaseType": "registration",
"renewalPrice": 14.99
},
{
"domainName": "example.io",
"purchasable": true,
"purchasePrice": 35.00,
"purchaseType": "registration",
"renewalPrice": 35.00
}
]
}
CodeDescription
400Invalid request — e.g. empty domainNames array or more than 50 names
402x402 payment challenge — no valid Sapiom identity or insufficient balance

Endpoint: POST https://namecom.services.sapiom.ai/v1/domains

Register a domain name for one year. The price is TLD-dependent and billed at Name.com’s live price at the time of purchase — check purchasePrice from sapiom_domains_search first. Executes a synchronous 3-step transaction; registration is live on success.

ParameterTypeRequiredDescription
domainNamestringYesDomain name to register, e.g. "example.io"
agentNamestringNoAgent name for spend attribution
{
"domainName": "example.io",
"expireDate": "2027-06-25T00:00:00.000Z",
"nameservers": ["ns1.name.com", "ns2.name.com"],
"locked": true,
"autorenewEnabled": false,
"privacyEnabled": true
}
CodeDescription
400Domain is not available, or the price at Name.com changed between search and purchase — retry the search and re-submit
402x402 payment challenge — insufficient balance or no valid Sapiom identity

Endpoint: POST https://namecom.services.sapiom.ai/v1/domains/:name/renew

Renew an existing domain for one year. The renewal price is TLD-dependent and billed at Name.com’s live renewal price — check renewalPrice from sapiom_domains_get or sapiom_domains_search first.

ParameterTypeRequiredDescription
domainNamestringYesDomain name to renew, e.g. "example.io"
agentNamestringNoAgent name for spend attribution
{
"domainName": "example.io",
"expireDate": "2028-06-25T00:00:00.000Z"
}
CodeDescription
400Domain not found in your account, or the price at Name.com changed — retry and re-submit
402x402 payment challenge — insufficient balance or no valid Sapiom identity

Endpoint: GET https://namecom.services.sapiom.ai/v1/domains

List all domains registered under your account. Free.

ParameterTypeRequiredDescription
agentNamestringNoAgent name for spend attribution
{
"domains": [
{
"domainName": "example.io",
"expireDate": "2027-06-25T00:00:00.000Z",
"locked": true,
"autorenewEnabled": false,
"privacyEnabled": true
}
]
}
CodeDescription
402x402 payment challenge — no valid Sapiom identity

Endpoint: GET https://namecom.services.sapiom.ai/v1/domains/:name

Get details for a single domain — nameservers, transfer lock status, renewal price, and transfer eligibility. Free.

ParameterTypeRequiredDescription
domainNamestringYesDomain name to look up, e.g. "example.io"
agentNamestringNoAgent name for spend attribution
{
"domainName": "example.io",
"expireDate": "2027-06-25T00:00:00.000Z",
"nameservers": ["ns1.name.com", "ns2.name.com"],
"locked": true,
"autorenewEnabled": false,
"privacyEnabled": true,
"renewalPrice": 35.00,
"transferEligible": false
}
CodeDescription
402x402 payment challenge — no valid Sapiom identity
404Domain not found in your account

Endpoint: POST https://namecom.services.sapiom.ai/v1/domains/:name/records

Add a DNS record to a domain. Free.

ParameterTypeRequiredDescription
domainNamestringYesDomain name, e.g. "example.io"
typeenumYesRecord type: A, AAAA, ANAME, CNAME, MX, TXT, SRV, or NS
hoststringYesSubdomain or hostname; use "" (empty string) for the root/apex (@)
valuestringYesRecord value — e.g. an IP address for A, a domain for CNAME
ttlnumberNoTime-to-live in seconds (minimum 300, default 300)
prioritynumberNoPriority for MX records
agentNamestringNoAgent name for spend attribution
{
"id": 12345,
"domainName": "example.io",
"host": "www",
"type": "A",
"value": "203.0.113.10",
"ttl": 300
}
CodeDescription
400Invalid record — malformed value, missing required field, or unsupported type
402x402 payment challenge — no valid Sapiom identity
404Domain not found in your account

Endpoint: GET https://namecom.services.sapiom.ai/v1/domains/:name/records

List all DNS records for a domain. Free.

ParameterTypeRequiredDescription
domainNamestringYesDomain name, e.g. "example.io"
agentNamestringNoAgent name for spend attribution
{
"records": [
{
"id": 12345,
"domainName": "example.io",
"host": "www",
"type": "A",
"value": "203.0.113.10",
"ttl": 300
}
]
}
CodeDescription
402x402 payment challenge — no valid Sapiom identity
404Domain not found in your account

Endpoint: PUT https://namecom.services.sapiom.ai/v1/domains/:name/records/:id

Update an existing DNS record. Merge semantics — only the fields you supply are changed; omitted fields retain their current values. Free.

ParameterTypeRequiredDescription
domainNamestringYesDomain name, e.g. "example.io"
recordIdnumberYesRecord ID returned by sapiom_dns_create_record or sapiom_dns_list_records
typeenumNoNew record type (see sapiom_dns_create_record for valid values)
hoststringNoNew hostname
valuestringNoNew record value
ttlnumberNoNew TTL (minimum 300)
prioritynumberNoNew priority (MX records only)
agentNamestringNoAgent name for spend attribution
{
"id": 12345,
"domainName": "example.io",
"host": "www",
"type": "A",
"value": "203.0.113.42",
"ttl": 300
}
CodeDescription
400Invalid update — malformed value or unsupported type
402x402 payment challenge — no valid Sapiom identity
404Domain or record not found

Endpoint: DELETE https://namecom.services.sapiom.ai/v1/domains/:name/records/:id

Delete a DNS record by ID. Free. Returns 204 No Content on success.

ParameterTypeRequiredDescription
domainNamestringYesDomain name, e.g. "example.io"
recordIdnumberYesRecord ID to delete
agentNamestringNoAgent name for spend attribution
CodeDescription
402x402 payment challenge — no valid Sapiom identity
404Domain or record not found

All routes carry @X402Payment. Domain purchase and renewal prices are TLD-dependent and billed at the live Name.com price at the time of each call. Search sapiom_domains_search first to get the current price before committing to a buy or renew.

OperationToolPrice
Search availabilitysapiom_domains_searchFree
Buy a domainsapiom_domains_buyTLD-dependent — billed at live Name.com purchase price
Renew a domainsapiom_domains_renewTLD-dependent — billed at live Name.com renewal price
List domainssapiom_domains_listFree
Get domain detailssapiom_domains_getFree
Create DNS recordsapiom_dns_create_recordFree
List DNS recordssapiom_dns_list_recordsFree
Update DNS recordsapiom_dns_update_recordFree
Delete DNS recordsapiom_dns_delete_recordFree

Free operations require a valid Sapiom identity (API key). An absent or invalid key triggers an x402 payment challenge (HTTP 402), not a 401. Paid operations additionally require sufficient prepaid balance; a price mismatch between search and buy/renew returns 400 — re-search and retry.