Developers → Quickstart

Quickstart

In five minutes: an API key, a domain availability check, a DNS record, and a webhook that tells your code when the record changes. Every step works with curl or the nameocean CLI.

1. Get a key

Open Dashboard → API keys and create a key with account:read, domains:read, dns:write and webhooks:write. It is shown once. Keys need two-step login on your account.

curl
$ export NAMEOCEAN_API_KEY=no_live_…
$ curl https://nameocean.net/api/v1/account -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
{"email": "you@example.com", "credit": "42.00", "currency": "USD", "domains": 3, "dns_zones": 3}

With the CLI you can skip the key: nameocean login signs in through the browser. Install it with brew install nameocean/tap/nameocean or curl -fsSL https://nameocean.net/install.sh | sh.

nameocean
$ nameocean login
$ nameocean account

2. Check a domain

curl
$ curl "https://nameocean.net/api/v1/domains/check?name=kahvebot.com" \
    -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
{"name": "kahvebot.com", "available": true, "years": 1, "premium": false,
 "register_price": "10.99", "renew_price": "10.99", "currency": "USD"}
$ nameocean domains check kahvebot.com

Registering is POST /domains and is paid from account credit, so it needs the billing:write scope as well. The rest of this page uses a domain you already have on NameOcean DNS.

3. Add a DNS record

curl
$ curl -X POST https://nameocean.net/api/v1/dns/example.com/records \
    -H "Authorization: Bearer $NAMEOCEAN_API_KEY" -H "Content-Type: application/json" \
    -d '{"type": "A", "hostname": "app", "ip": "203.0.113.10", "ttl": "5m"}'
{"id": 4183, "type": "A", "hostname": "app", "ip": "203.0.113.10", "ttl": "5m"}
$ nameocean dns add example.com A app 203.0.113.10 --ttl 5m
$ dig +short app.example.com @ns1.nameocean.net
203.0.113.10

The nameservers answer with the new record within seconds. hostname is relative to the zone: @ is example.com itself. Change it with PATCH /dns/example.com/records/A/4183, delete it with DELETE on the same path.

4. Get a webhook

Tell NameOcean where to post DNS events. The URL must be HTTPS on a public address; the answer carries the signing secret, once.

curl
$ curl -X POST https://nameocean.net/api/v1/webhooks \
    -H "Authorization: Bearer $NAMEOCEAN_API_KEY" -H "Content-Type: application/json" \
    -d '{"url": "https://example.com/hooks/nameocean", "events": ["dns.*"]}'
{"id": 12, "url": "https://example.com/hooks/nameocean", "events": ["dns.*"], "active": true,
 "secret": "whsec_…", …}
$ curl -X POST https://nameocean.net/api/v1/webhooks/12/test -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
{"id": "whd_…", "event": {"type": "webhook.test", …}, "status": "succeeded", "response_status": 200, …}

Now change the record from step 3 and your endpoint gets a dns.record.updated event with the record before and after. Check the X-NameOcean-Signature header before you trust a call: verification code for Python, Node and Go.

5. Or let your AI do it

Everything above is also a tool on the MCP server. In Claude Code:

Claude Code
$ claude mcp add --transport http nameocean https://nameocean.net/mcp
> Point app.example.com to 203.0.113.10 and tell me when the nameservers have it.

Next

  • API reference: every endpoint, its scope, fields and errors
  • Guides: wildcard certificates with DNS-01, incoming email in your app, deploying with git push
  • DNS as code: the whole zone in one file in git
  • Changelog: what is new