---
title: DNS API
description: DNS zones and records (Hostino free DNS and hosting domains' DNS) via the API
sidebar:
  order: 8
  badge:
    text: Alpha
    variant: tip
---

All endpoints live on `https://api.hostino.ai` and use an OAuth (Bearer) token. This is the same "Free DNS" and DNS management as in the Hostino panel, with the same rules and ownership checks: only zones that belong to the token owner are reachable.

| Endpoint | Scope | What it does |
|---|---|---|
| `GET /v1/dns/zones` | `dns:read` | Free DNS zones (with status) and the DNS of hosting/email service domains |
| `POST /v1/dns/zones` | `dns:write` | Add a domain to free DNS (`{"domain":"example.com"}`) |
| `GET /v1/dns/zones/:domain` | `dns:read` | Zone details |
| `POST /v1/dns/zones/:domain/verify` | `dns:read` | Re-check whether the domain's nameservers point to Hostino |
| `GET /v1/dns/zones/:domain/nameservers` | `dns:read` | The nameservers the domain must use |
| `GET /v1/dns/zones/:domain/records` | `dns:read` | All records of the zone |
| `POST /v1/dns/zones/:domain/records` | `dns:write` | Add or replace records |
| `DELETE /v1/dns/zones/:domain/records?type=&name=` | `dns:write` | Delete all records of one type and name |
| `GET /v1/dns/zones/:domain/propagation?name=&type=` | `dns:read` | What Hostino's two name servers and Cloudflare / Google / Quad9 answer for one record, compared with the zone |
| `GET /v1/dns/zones/:domain/export` | `dns:read` | The zone as a BIND zone file (`zone_file`) |
| `POST /v1/dns/zones/:domain/templates/:template` | `dns:write` | `google-workspace`, `zoho-mail`, `microsoft-365`, `github-pages` (`params.github_user`), `vercel`, `netlify` (`params.netlify_site`), `dmarc` (`params.report_email`). Body `{"params":{…},"apply":false}` previews; `"apply":true` applies after a snapshot |
| `DELETE /v1/dns/zones/:domain?confirm_domain=:domain` | `dns:write` | Remove the zone from free DNS (a snapshot is kept 30 days) |

## Add or change records

```bash
curl -s -X POST https://api.hostino.ai/v1/dns/zones/example.com/records -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"type":"A","name":"www","content":"185.199.108.153","ttl":3600}'
```

- `type`: `A`, `AAAA`, `CNAME`, `MX`, `TXT`, `NS`, `SRV`, `CAA` or `ALIAS`.
- `name`: relative to the zone; `@` or empty means the domain itself.
- `content` **adds one value**: for multi-value types (e.g. several A records) it is merged with the existing values of that name.
- `contents` (array) **replaces the whole set**.
- `MX` with priority: `"10 mail.example.com"`. Minimum `ttl` is 60 seconds.

## Snapshots and restore

Every `POST` or `DELETE` on records is preceded by a snapshot of the zone, and `snapshot_id` is returned.

| Endpoint | Scope | What it does |
|---|---|---|
| `GET /v1/dns/zones/:domain/snapshots` | `dns:read` | Snapshots, newest first (last 20, 30 days) |
| `POST /v1/dns/zones/:domain/snapshots` | `dns:write` | Take a snapshot now (optional `{"reason":"…"}`) |
| `GET /v1/dns/zones/:domain/snapshots/:id` | `dns:read` | Restore preview: `replace` (with current values) and `remove` |
| `POST /v1/dns/zones/:domain/snapshots/:id/restore` | `dns:write` | Restore; a safety snapshot is taken first (`safety_snapshot`) |

The SOA record and the domain's own NS records are never changed by a restore.

## New zone

After `POST /v1/dns/zones` the zone is `pending` until you set the domain's nameservers to Hostino's at your registrar; check with `verify` until it is `active`.

## In MCP

Tools `dns_list_zones`, `dns_list_records`, `dns_set_record`, `dns_delete_record`, `dns_add_zone` and `dns_zone_status`; guide: [DNS, SSL and support with AI](/en/ai-mcp/dns-ssl-support/).
