Saltar al contenido

MCP para agentes de IA30 herramientasTu agente de IA trabaja con los permisos que tú le das. Registrar, transferir y cancelar sigue en el área de cliente. Si le das el permiso, puede obtener el código de transferencia de un dominio: como máximo 3 consultas por dominio y día, y cada consulta queda registrada.

Leer la documentación de MCP
Recipe
about 8 minutes
v1.6.2
Download OpenAPI

Bootstrap new hosts in an existing zone

Create baseline records for new subdomains and verify immediately afterwards that they were written with the expected ID and values.
Beginnerabout 8 minutesDNSBootstrapSubdomainSetupPlatform
Duration
about 8 minutes
Level
Beginner
Endpoints
3

This recipe fits the case where several hostnames must be created for a new service, such as api, app, or status. The flow combines inventory, creation, and direct verification.

Prerequisites

  • an API key with access to the DNS endpoints
  • an existing zone managed through regfish DNS
  • target values for the new hosts, such as IP addresses or CNAME targets
  • a naming convention for technical and public hostnames

Step 1: Inspect the existing zone

Before creating new hosts, inspect the current zone so you can avoid collisions and detect early whether a hostname is already in use.

bash
curl --request GET \
  --url 'https://api.regfish.com/dns/example.com/rr' \
  --header 'x-api-key: YOUR_API_KEY'

Step 2: Create the first host

For example, create an API host with a direct IPv4 target.

bash
curl --request POST \
  --url 'https://api.regfish.com/dns/rr' \
  --header 'content-type: application/json' \
  --header 'x-api-key: YOUR_API_KEY' \
  --data '
{
  "type": "A",
  "name": "api.example.com.",
  "data": "203.0.113.20",
  "ttl": 300,
  "annotation": "bootstrap-api"
}
'

The response returns the new id, which should be stored for verification.

Step 3: Create another host as a CNAME

For web or routing entry points, a CNAME is often a good fit.

bash
curl --request POST \
  --url 'https://api.regfish.com/dns/rr' \
  --header 'content-type: application/json' \
  --header 'x-api-key: YOUR_API_KEY' \
  --data '
{
  "type": "CNAME",
  "name": "app.example.com.",
  "data": "api.example.com.",
  "ttl": 300,
  "annotation": "bootstrap-app"
}
'

Step 4: Verify the created records directly

Once you have stored the RRIDs returned by the create calls, fetch the records individually.

bash
curl --request GET \
  --url 'https://api.regfish.com/dns/rr/5001' \
  --header 'x-api-key: YOUR_API_KEY'

Check:

  • that id matches the value returned by the create call
  • that name, type, and data were stored correctly
  • that ttl and annotations were written as intended

Practical notes for production workflows

  • always inspect the zone before creating new records
  • use consistent TTLs for newly bootstrapped service records
  • store technical origin or service names in annotations
  • keep the new RRIDs immediately so later updates remain explicit
  • treat bootstrap and later desired-state synchronization as separate workflows

Result

This workflow lets you add new hosts to an existing zone quickly and in a controlled way. It is especially useful for new services, staging environments, or standardized platform provisioning.

Community

Forma parte de la comunidad

La DNS API de regfish es una gran solución para desarrolladores que quieren automatizar dominios y zonas DNS. Súmese a la comunidad y aproveche las ventajas de la automatización DNS. La DNS API está disponible gratis para todos los clientes de regfish.