ionos-dns-manager
Manage IONOS DNS zones and records from the command line — list zones, filter records, create, update, and delete A/AAAA/TXT/MX records.
$ skillbank install ionos-dns-manager@1.0.0 # pins exactly 1.0.0 · README + changelog included
Overview
A zero-dependency Python CLI for the IONOS Hosting DNS API. List zones, inspect and filter records, and create/update/delete records — everything you need to script DNS changes (Let's Encrypt DNS-01, failover, bulk migrations) without clicking through the IONOS panel.
Installation
- Copy the
ionos-dns-manager/directory anywhere convenient. - Make the script executable (Unix):
``bash chmod +x scripts/ionos.py ``
- Create an API key in the IONOS control panel (it looks like
<public-prefix>.<secret> — paste the whole thing) and export it: ``bash export IONOS_API_KEY="<public-prefix>.<secret>" ``
No pip install needed — standard library only.
Configuration
| Variable | Required | Description |
|---|---|---|
IONOS_API_KEY | yes | Full IONOS API key (prefix.secret), sent as X-API-Key. |
The key is never printed, logged, or persisted by this tool. Prefer an env file or secret manager over export on shared machines.
Inputs
| Command | Arguments | Returns |
|---|---|---|
zones | — | All DNS zones on the account. |
zone | <zoneId> [--suffix FQDN] [--record-name NAME] [--record-type A,AAAA] | Zone detail, optionally filtered. |
create-records | <zoneId> '<json-array>' | Created record objects. |
update-record | <zoneId> <recordId> '<json-object>' | Updated record object. |
delete-record | <zoneId> <recordId> | Confirmation. |
Record JSON follows the IONOS schema: [{"name": "www", "type": "A", "content": "203.0.113.10", "ttl": 3600}].
Worked example
$ export IONOS_API_KEY="..."
$ ./scripts/ionos.py zones | head -c 200
[{"id": "a1b2c3...", "name": "example.com", "type": "NATIVE"}]...
$ ZONE=a1b2c3...
$ ./scripts/ionos.py zone $ZONE --record-type A --record-name www
{"id": "...", "name": "example.com", "records": [{"id": "r1", "name": "www", "type": "A", "content": "203.0.113.10"}]}
$ ./scripts/ionos.py create-records $ZONE '[{"name": "test", "type": "TXT", "content": "hello", "ttl": 300}]'
[{"id": "r9", "name": "test", "type": "TXT", "content": "hello"}]
$ ./scripts/ionos.py delete-record $ZONE r9
{"ok": true}
Safety notes
DNS writes are destructive and propagate publicly. The CLI prints exactly what the API returns — verify zoneId and recordId before update/delete. There is no undo; IONOS keeps no record history for you. Consider scripting a zone snapshot (JSON to a file) before bulk changes.
Version history
- v1.0.02026-09-26
- Initial public release.
- Commands:
zones,zone(with--suffix/--record-name/--record-typefilters),create-records,update-record,delete-record. - Auth via
IONOS_API_KEYenvironment variable (X-API-Keyheader); zero dependencies. - Battle-tested lineage: the underlying API calls managed 30+ production DNS records (A/AAAA/MX/TXT/SPF/DKIM/DMARC) across dozens of zones.