Skip to content

Getting started with the API

There are two ways to use regfish: clicking in the dash or automating through the API. This page is the entry into the second one and takes about five minutes.

The key is created in the dash; the way there is described in creating an API key. Give it only the permissions the job needs: a key limited to dns:read cannot change records even if it leaks.

Every call goes to https://api.regfish.com and carries the key in the x-api-key header:

Terminal window
curl 'https://api.regfish.com/dns/zones' \
-H "x-api-key: $REGFISH_API_KEY"

That lists the DNS zones of the account, meaning your domains. The reference: list DNS zones.

Every response carries the same envelope:

{
"success": true,
"code": 200,
"response": {"zones": ["example.com"]}
}

success states whether the call worked, code follows HTTP, the payload sits under response. If the key lacks a permission, the API rejects the call and names the missing one. The concepts behind it, zone versus record, the rrid, the trailing dot on names, are covered in core concepts; every field structure is in the schemas.

The first writing call is usually add a DNS record. Every endpoint page carries a request builder that turns your values into a ready command to copy. Before touching production zones, the recipe DNS change with rollback is worth a look: it saves the old state before writing.

GoalPath
Renew certificates without manual workcertbro or the TLS recipes
A server keeps its own IP currentDynDNS
Maintain records from scriptsDNS desired state
Connect an AI assistantMCP server
X-ray a domainDNS Doctor

The search above finds every page of these docs. And the API answers questions itself: ask the regfish assistant takes a question in plain language and answers with pointers into account and docs.