Dominios, DNS, hosting y correo de un solo proveedor.
Empresa



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.
Before creating new hosts, inspect the current zone so you can avoid collisions and detect early whether a hostname is already in use.
curl --request GET \
--url 'https://api.regfish.com/dns/example.com/rr' \
--header 'x-api-key: YOUR_API_KEY'For example, create an API host with a direct IPv4 target.
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.
For web or routing entry points, a CNAME is often a good fit.
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"
}
'Once you have stored the RRIDs returned by the create calls, fetch the records individually.
curl --request GET \
--url 'https://api.regfish.com/dns/rr/5001' \
--header 'x-api-key: YOUR_API_KEY'Check:
id matches the value returned by the create callname, type, and data were stored correctlyttl and annotations were written as intendedThis 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.
La DNS API de regfish es una gran solucion para desarrolladores que quieren automatizar dominios y zonas DNS. Sumate a la comunidad y aprovecha las ventajas de la automatizacion DNS. La DNS API esta disponible gratis para todos los clientes de regfish.