API-Dokumentation (mydomain.lu)

API‑Übersicht

Die mydomain.lu DNS Management API ermöglicht die automatisierte Verwaltung von DNS‑Zonen. Sie bietet Funktionen zum Abrufen von Zonendaten, Exportieren von Zonendateien sowie zum Hinzufügen, Aktualisieren oder Entfernen von DNS‑Einträgen. Jede Änderung erzeugt ein Ticket, da DNS‑Modifikationen asynchron verarbeitet werden.
Eine Bestellung wird nacheinander verarbeitet. Du musst warten, bis die aktuelle Bestellung abgeschlossen ist, bevor du eine neue einreichst. Wenn du nicht wartest, schlägt die Bestellung fehl. Bitte warte ein paar Sekunden, bis die Bestellung abgeschlossen und übernommen wurde.


Voraussetzungen

  • Sie müssen Kunde von mydomain.lu sein.
  • Sie benötigen ein gültiges Konto, das sich in das Web‑Interface einloggen kann (Test empfohlen).
  • Zwei-Faktor-Authentifizierung (2FA) ist deaktiviert. Wenn Sie 2FA weiterhin aktiviert lassen möchten, wenden Sie sich bitte an den Support (post.lu), um ein eingeschränktes Konto ausschließlich für die API-Nutzung zu erhalten.
  • Sie benötigen die erforderlichen API‑Berechtigungen.

Authentifizierung

Alle API‑Requests benötigen einen Basic‑Auth Header:

Authorization: Basic {Base64KodierteZugangsdaten}

Inhaltsverzeichnis





======================================
GET – ZONENINFORMATIONEN
======================================

1. Zoneninformationen abrufen

GET:
https://api.mydomain.lu/zones/{domain}
Beispiel: https://api.mydomain.lu/zones/example.lu

Parameter

  • Authorization (Header)
  • domain (Pfadparameter)

Antwort 200 OK

{
  "expire": "2026-03-23T14:57:43.279Z",
  "creation": "2026-03-23T14:57:43.279Z",
  "lastChange": "2026-03-23T14:57:43.279Z",
  "domain": "example.lu",
  "contactArray": [...],
  "nameserverArray": [...],
  "resourceRecords": [...],
  "domainStatus": [...]
}

 

2. DNS‑Einträge einer Zone abrufen

GET:
https://api.mydomain.lu/zones/{domain}/records
Beispiel: https://api.mydomain.lu/zones/example.lu/records

Antwort 200 OK

[
  {
    "group": "default",
    "AResourceRecord": [...],
    "CNAMEResourceRecord": [...],
    "TXTResourceRecord": [
      { "name": "example.lu.", "ttl": 0, "active": true, "text": "OtSANXuE" },
      { "name": "example.lu.", "ttl": 0, "active": true, "text": "40plQl4A" },
      { "name": "example.lu.", "ttl": 0, "active": true, "text": "hello 123" },
      { "name": "example.lu.", "ttl": 0, "active": true, "text": "v=spf1 include:spf-strict.hostpack.lu -all" }
    ]
  }
]

 

3. Zone exportieren

GET:
https://api.mydomain.lu/zones/{domain}/export
Beispiel: https://api.mydomain.lu/zones/example.lu/export

Antwort 200 OK

example.lu. 172800 IN NS ns1.pt.lu.
example.lu. 172800 IN NS ns3.pt.lu.
example.lu. 172800 IN NS ns2.pt.lu.
example.lu. 3600   IN MX 10 mx.hostpack.lu.
smtp.example.lu. 3600 IN CNAME outgoing.hostpack.lu.
api.example.lu.  300  IN CNAME backend.example.lu.
www.example.lu.  3600 IN A 194.154.192.87
example.lu.      300  IN A 194.154.192.87
example.lu.      300  IN A 127.127.127.127




======================================
PATCH – DNS‑EINTRÄGE ÄNDERN
======================================

4. A‑Record hinzufügen

PATCH:
https://api.mydomain.lu/zones/{domain}/records/add/ARecord
Beispiel: https://api.mydomain.lu/zones/example.lu/records/add/ARecord

Anfrage‑Body

{
  "name": "example.lu.",
  "ttl": "300",
  "active": "true",
  "hostAddress": "127.127.127.127"
}

Antwort 200 OK

{
  "code": 1001,
  "message": "Domain Zone Modify - Command completed successfully. Action pending.",
  "ticket": "2603261350443199",
  "infoMsg": [],
  "errorMsg": []
}

 

5. A‑Record entfernen

PATCH:
https://api.mydomain.lu/zones/{domain}/records/remove/ARecord
Beispiel: https://api.mydomain.lu/zones/example.lu/records/remove/ARecord

Anfrage‑Body

{
  "name": "example.lu.",
  "ttl": "300",
  "active": "true",
  "hostAddress": "127.127.127.127"
}

Antwort 200 OK

{
  "code": 1001,
  "message": "Domain Zone Modify - Command completed successfully. Action pending.",
  "ticket": "2603261353158199",
  "infoMsg": [],
  "errorMsg": []
}

 

6. TXT‑Record hinzufügen

PATCH:
https://api.mydomain.lu/zones/{domain}/records/add/TXTRecord
Beispiel: https://api.mydomain.lu/zones/example.lu/records/add/TXTRecord

Anfrage‑Body

{
  "name": "example.lu.",
  "ttl": "300",
  "active": "true",
  "text": "66iCWhUr"
}

Antwort 200 OK

{
  "code": 1001,
  "message": "Domain Zone Modify - Command completed successfully. Action pending.",
  "ticket": "2603261345481210",
  "infoMsg": [],
  "errorMsg": []
}

 

7. TXT‑Record entfernen

PATCH:
https://api.mydomain.lu/zones/{domain}/records/remove/TXTRecord
Beispiel: https://api.mydomain.lu/zones/example.lu/records/remove/TXTRecord

Anfrage‑Body

{
  "name": "example.lu.",
  "ttl": "300",
  "active": "true",
  "text": "66iCWhUr"
}

Antwort 200 OK

{
  "code": 1001,
  "message": "Domain Zone Modify - Command completed successfully. Action pending.",
  "ticket": "2603261355413680",
  "infoMsg": [],
  "errorMsg": []
}

 

8. CNAME‑Record hinzufügen

PATCH:
https://api.mydomain.lu/zones/{domain}/records/add/CNAMERecord
Beispiel: https://api.mydomain.lu/zones/example.lu/records/add/CNAMERecord

Anfrage‑Body

{
  "name": "api.example.lu.",
  "ttl": "300",
  "active": "true",
  "hostname": "example.lu.copr.lu."
}

Antwort 200 OK

{
  "code": 1001,
  "message": "Domain Zone Modify - Command completed successfully. Action pending.",
  "ticket": "2603261400502312",
  "infoMsg": [],
  "errorMsg": []
}

 

9. CNAME‑Record entfernen

PATCH:
https://api.mydomain.lu/zones/{domain}/records/remove/CNAMERecord
Beispiel: https://api.mydomain.lu/zones/example.lu/records/remove/CNAMERecord

Anfrage‑Body

{
  "name": "api.example.lu.",
  "ttl": "300",
  "active": "true",
  "hostname": "example.lu.copr.lu."
}

Antwort 200 OK

{
  "code": 1001,
  "message": "Domain Zone Modify - Command completed successfully. Action pending.",
  "ticket": "2603261400502312",
  "infoMsg": [],
  "errorMsg": []
}