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.
1. Create an API key
Section titled “1. Create an API key”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.
2. First call
Section titled “2. First call”Every call goes to https://api.regfish.com and carries the key in the x-api-key header:
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.
3. Reading the answer
Section titled “3. Reading the answer”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.
4. Changing something
Section titled “4. Changing something”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.
Where to go next
Section titled “Where to go next”| Goal | Path |
|---|---|
| Renew certificates without manual work | certbro or the TLS recipes |
| A server keeps its own IP current | DynDNS |
| Maintain records from scripts | DNS desired state |
| Connect an AI assistant | MCP server |
| X-ray a domain | DNS Doctor |
When something is stuck
Section titled “When something is stuck”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.