curl --request PUT \
--url https://api.netzfabrik.com/domains/{id}/nameservers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nameservers": [
"ns1.netzfabrik.com",
"ns2.netzfabrik.com"
]
}
'import requests
url = "https://api.netzfabrik.com/domains/{id}/nameservers"
payload = { "nameservers": ["ns1.netzfabrik.com", "ns2.netzfabrik.com"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({nameservers: ['ns1.netzfabrik.com', 'ns2.netzfabrik.com']})
};
fetch('https://api.netzfabrik.com/domains/{id}/nameservers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.netzfabrik.com/domains/{id}/nameservers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'nameservers' => [
'ns1.netzfabrik.com',
'ns2.netzfabrik.com'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.netzfabrik.com/domains/{id}/nameservers"
payload := strings.NewReader("{\n \"nameservers\": [\n \"ns1.netzfabrik.com\",\n \"ns2.netzfabrik.com\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.netzfabrik.com/domains/{id}/nameservers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nameservers\": [\n \"ns1.netzfabrik.com\",\n \"ns2.netzfabrik.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.netzfabrik.com/domains/{id}/nameservers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nameservers\": [\n \"ns1.netzfabrik.com\",\n \"ns2.netzfabrik.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"adminHandle": {
"id": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"company": "<string>",
"address": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"countryCode": "<string>",
"email": "<string>",
"language": "<string>",
"note": "<string>",
"verified": true,
"phone": "<string>",
"fax": "<string>",
"phone1": "<string>",
"phone2": "<string>",
"phone3": "<string>",
"fax1": "<string>",
"fax2": "<string>",
"fax3": "<string>",
"type": "ORG",
"warnings": [
"<string>"
],
"_meta": {
"resourceOwnerCustomer": {
"id": "<string>",
"name": "<string>"
}
}
},
"techHandle": {
"id": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"company": "<string>",
"address": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"countryCode": "<string>",
"email": "<string>",
"language": "<string>",
"note": "<string>",
"verified": true,
"phone": "<string>",
"fax": "<string>",
"phone1": "<string>",
"phone2": "<string>",
"phone3": "<string>",
"fax1": "<string>",
"fax2": "<string>",
"fax3": "<string>",
"type": "ORG",
"warnings": [
"<string>"
],
"_meta": {
"resourceOwnerCustomer": {
"id": "<string>",
"name": "<string>"
}
}
},
"ownerHandle": {
"id": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"company": "<string>",
"address": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"countryCode": "<string>",
"email": "<string>",
"language": "<string>",
"note": "<string>",
"verified": true,
"phone": "<string>",
"fax": "<string>",
"phone1": "<string>",
"phone2": "<string>",
"phone3": "<string>",
"fax1": "<string>",
"fax2": "<string>",
"fax3": "<string>",
"type": "ORG",
"warnings": [
"<string>"
],
"_meta": {
"resourceOwnerCustomer": {
"id": "<string>",
"name": "<string>"
}
}
},
"zoneHandle": {
"id": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"company": "<string>",
"address": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"countryCode": "<string>",
"email": "<string>",
"language": "<string>",
"note": "<string>",
"verified": true,
"phone": "<string>",
"fax": "<string>",
"phone1": "<string>",
"phone2": "<string>",
"phone3": "<string>",
"fax1": "<string>",
"fax2": "<string>",
"fax3": "<string>",
"type": "ORG",
"warnings": [
"<string>"
],
"_meta": {
"resourceOwnerCustomer": {
"id": "<string>",
"name": "<string>"
}
}
},
"isAutoRenewEnabled": true,
"registrationDate": "<string>",
"expiresAt": "<string>",
"status": "created",
"lifecycleStatus": "draft",
"statusReason": "abuseHold",
"flags": [
"transferLock"
],
"nameservers": [
{
"name": "<string>",
"ipv4Address": "<string>"
}
],
"priceClass": "<string>",
"transitType": "connected",
"transitAt": "<string>",
"canceledAt": "<string>",
"transferOutDeadlineAt": "<string>",
"paidAt": "<string>",
"promisedRenewGross": 123,
"premiumAcknowledgedAt": "<string>",
"premiumQuoteExpiresAt": "<string>",
"delegationCheckStatus": "ok",
"delegationCheckFindings": {},
"delegationCheckedAt": "<string>",
"labels": [
{
"id": "<string>",
"name": "<string>",
"color": "gray"
}
],
"zone": "<string>",
"sandbox": true,
"displayStatus": "<string>",
"displayReason": "<string>",
"nextAction": "none",
"statusSeverity": "<string>",
"dnsZoneId": "<string>",
"dnsManaged": true,
"nameserverRuleActive": true,
"nameserverSetup": "<string>",
"isDomainTransferLocked": true,
"isTransferIn": true,
"_meta": {
"resourceOwnerCustomer": {
"id": "<string>",
"name": "<string>"
}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"error": "<string>",
"message": "<string>",
"details": {},
"instance": "<string>",
"violations": [
{
"propertyPath": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"error": "<string>",
"message": "<string>",
"details": {},
"instance": "<string>",
"violations": [
{
"propertyPath": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"error": "<string>",
"message": "<string>",
"details": {},
"instance": "<string>",
"violations": [
{
"propertyPath": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"error": "<string>",
"message": "<string>",
"details": {},
"instance": "<string>",
"violations": [
{
"propertyPath": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"error": "<string>",
"message": "<string>",
"details": {},
"instance": "<string>",
"violations": [
{
"propertyPath": "<string>",
"message": "<string>",
"code": "<string>",
"hint": "<string>",
"payload": {}
}
]
}{
"error": "api_token_rate_limited",
"message": "Zu viele Anfragen mit API-Tokens für diesen Kunden. Bitte später erneut versuchen.",
"details": {}
}Nameserver ändern
Setzt die Nameserver der Domain (2 bis 13 Hostnamen). Die Änderung wird an die Registry übertragen und ist nach deren Bearbeitung wirksam.
DNS-Zone (sofern die Regel „DNS-Zone nur mit unseren Nameservern“ für dein Konto aktiviert ist). Ohne die Regel ändert ein Nameserver-Wechsel nichts an der DNS-Zone. Mit der Regel gilt: Wechselst du von fremden zu unseren Nameservern, übernehmen wir eine vorhandene DNS-Zone deines Kontos für die Domain oder legen eine neue mit den Standard-Einträgen an, bevor die Änderung an die Registry geht. Gehört eine Zone gleichen Namens einem anderen Konto, antwortet die API mit 409 und ändert nichts. Wechselst du von unseren zu fremden Nameservern, bleibt die Zone erhalten (nichts wird gelöscht), wird aber nicht mehr ausgeliefert; in GET /domains/{id} steht dann dnsManaged: false. Ein späterer Rückwechsel nutzt sie wieder. Gemischte Listen, Nameserver aus mehreren unserer Sätze und Namen knapp neben unseren Nameservern lehnt die API mit 422 ab (siehe POST /domains/order).
Ist die Funktion „Eigene Nameserver (Glue-Records)“ für dein Konto freigeschaltet, dürfen Nameserver unterhalb der Domain selbst stehen (z. B. ns1.example.de für example.de). Sie brauchen Glue-Adressen: entweder in glue ([{hostname, ipv4, ipv6}], nur öffentliche Adressen, je Familie höchstens 8) oder aus einem gespeicherten eigenen Nameserver (GET /domains/{id}/glue-hosts). Fehlen sie, antwortet die API mit 422 und nennt die Hosts. Ohne diese Freischaltung ist glue nicht erlaubt (403).
curl --request PUT \
--url https://api.netzfabrik.com/domains/{id}/nameservers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"nameservers": [
"ns1.netzfabrik.com",
"ns2.netzfabrik.com"
]
}
'import requests
url = "https://api.netzfabrik.com/domains/{id}/nameservers"
payload = { "nameservers": ["ns1.netzfabrik.com", "ns2.netzfabrik.com"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({nameservers: ['ns1.netzfabrik.com', 'ns2.netzfabrik.com']})
};
fetch('https://api.netzfabrik.com/domains/{id}/nameservers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.netzfabrik.com/domains/{id}/nameservers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'nameservers' => [
'ns1.netzfabrik.com',
'ns2.netzfabrik.com'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.netzfabrik.com/domains/{id}/nameservers"
payload := strings.NewReader("{\n \"nameservers\": [\n \"ns1.netzfabrik.com\",\n \"ns2.netzfabrik.com\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.netzfabrik.com/domains/{id}/nameservers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"nameservers\": [\n \"ns1.netzfabrik.com\",\n \"ns2.netzfabrik.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.netzfabrik.com/domains/{id}/nameservers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"nameservers\": [\n \"ns1.netzfabrik.com\",\n \"ns2.netzfabrik.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"adminHandle": {
"id": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"company": "<string>",
"address": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"countryCode": "<string>",
"email": "<string>",
"language": "<string>",
"note": "<string>",
"verified": true,
"phone": "<string>",
"fax": "<string>",
"phone1": "<string>",
"phone2": "<string>",
"phone3": "<string>",
"fax1": "<string>",
"fax2": "<string>",
"fax3": "<string>",
"type": "ORG",
"warnings": [
"<string>"
],
"_meta": {
"resourceOwnerCustomer": {
"id": "<string>",
"name": "<string>"
}
}
},
"techHandle": {
"id": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"company": "<string>",
"address": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"countryCode": "<string>",
"email": "<string>",
"language": "<string>",
"note": "<string>",
"verified": true,
"phone": "<string>",
"fax": "<string>",
"phone1": "<string>",
"phone2": "<string>",
"phone3": "<string>",
"fax1": "<string>",
"fax2": "<string>",
"fax3": "<string>",
"type": "ORG",
"warnings": [
"<string>"
],
"_meta": {
"resourceOwnerCustomer": {
"id": "<string>",
"name": "<string>"
}
}
},
"ownerHandle": {
"id": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"company": "<string>",
"address": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"countryCode": "<string>",
"email": "<string>",
"language": "<string>",
"note": "<string>",
"verified": true,
"phone": "<string>",
"fax": "<string>",
"phone1": "<string>",
"phone2": "<string>",
"phone3": "<string>",
"fax1": "<string>",
"fax2": "<string>",
"fax3": "<string>",
"type": "ORG",
"warnings": [
"<string>"
],
"_meta": {
"resourceOwnerCustomer": {
"id": "<string>",
"name": "<string>"
}
}
},
"zoneHandle": {
"id": "<string>",
"firstname": "<string>",
"lastname": "<string>",
"company": "<string>",
"address": "<string>",
"addressLine2": "<string>",
"city": "<string>",
"state": "<string>",
"zipcode": "<string>",
"countryCode": "<string>",
"email": "<string>",
"language": "<string>",
"note": "<string>",
"verified": true,
"phone": "<string>",
"fax": "<string>",
"phone1": "<string>",
"phone2": "<string>",
"phone3": "<string>",
"fax1": "<string>",
"fax2": "<string>",
"fax3": "<string>",
"type": "ORG",
"warnings": [
"<string>"
],
"_meta": {
"resourceOwnerCustomer": {
"id": "<string>",
"name": "<string>"
}
}
},
"isAutoRenewEnabled": true,
"registrationDate": "<string>",
"expiresAt": "<string>",
"status": "created",
"lifecycleStatus": "draft",
"statusReason": "abuseHold",
"flags": [
"transferLock"
],
"nameservers": [
{
"name": "<string>",
"ipv4Address": "<string>"
}
],
"priceClass": "<string>",
"transitType": "connected",
"transitAt": "<string>",
"canceledAt": "<string>",
"transferOutDeadlineAt": "<string>",
"paidAt": "<string>",
"promisedRenewGross": 123,
"premiumAcknowledgedAt": "<string>",
"premiumQuoteExpiresAt": "<string>",
"delegationCheckStatus": "ok",
"delegationCheckFindings": {},
"delegationCheckedAt": "<string>",
"labels": [
{
"id": "<string>",
"name": "<string>",
"color": "gray"
}
],
"zone": "<string>",
"sandbox": true,
"displayStatus": "<string>",
"displayReason": "<string>",
"nextAction": "none",
"statusSeverity": "<string>",
"dnsZoneId": "<string>",
"dnsManaged": true,
"nameserverRuleActive": true,
"nameserverSetup": "<string>",
"isDomainTransferLocked": true,
"isTransferIn": true,
"_meta": {
"resourceOwnerCustomer": {
"id": "<string>",
"name": "<string>"
}
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"error": "<string>",
"message": "<string>",
"details": {},
"instance": "<string>",
"violations": [
{
"propertyPath": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"error": "<string>",
"message": "<string>",
"details": {},
"instance": "<string>",
"violations": [
{
"propertyPath": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"error": "<string>",
"message": "<string>",
"details": {},
"instance": "<string>",
"violations": [
{
"propertyPath": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"error": "<string>",
"message": "<string>",
"details": {},
"instance": "<string>",
"violations": [
{
"propertyPath": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"error": "<string>",
"message": "<string>",
"details": {},
"instance": "<string>",
"violations": [
{
"propertyPath": "<string>",
"message": "<string>",
"code": "<string>",
"hint": "<string>",
"payload": {}
}
]
}{
"error": "api_token_rate_limited",
"message": "Zu viele Anfragen mit API-Tokens für diesen Kunden. Bitte später erneut versuchen.",
"details": {}
}Authorizations
Access-Token aus POST /auth/login (E-Mail und Passwort), gesendet als Authorization: Bearer <token>.
Das Token ist zeitlich begrenzt gültig. Mit dem refresh_token aus derselben Antwort holt POST /auth/token/refresh ein neues Token-Paar, ohne das Passwort erneut zu senden; POST /auth/token/invalidate macht den Refresh-Token beim Abmelden ungültig.
Ist für das Konto ein zweiter Faktor aktiv oder vorgeschrieben, liefert der Login statt des Token-Paars mfaRequired: true bzw. mfaEnrollmentRequired: true und ein kurzlebiges preAuthToken. Mit diesem Token (ebenfalls als Bearer) wird der zweite Faktor über POST /auth/2fa/verify bestätigt; erst danach gibt es das volle Token-Paar.
Headers
Optionaler Kundenkontext. Ohne Header arbeitet die Anfrage im Standard-Kunden des angemeldeten Benutzers. Mit der ID eines anderen Kunden handelt die Anfrage in dessen Kontext: Listen, Lese- und Schreibzugriffe beziehen sich dann auf diesen Kunden.
Erlaubt sind der eigene Kunde, jeder Unterkunde im eigenen Teilbaum (Reseller handelt für seinen Endkunden) sowie Kunden, in denen der Benutzer selbst Mitglied ist. Übergeordnete oder fremde Kunden werden mit 403 Forbidden abgewiesen, eine unbekannte ID ebenfalls.
Die IDs der erreichbaren Kunden liefern GET /user/customers und GET /customers/{id}/children.
"01JD4Q8W3N6Y2K5T7R9V0B1C2D"
Body
Response
Erfolgreich.
Eine Domain mit Kontakten, Nameservern und Status.
Veraltet. Bisheriger Status der Domain; neue Integrationen nutzen lifecycleStatus, statusReason und flags.
created, pending, pendingRegistration, pendingTransfer, pendingTransferOut, zoneCreated, online, deleted, pendingDelete, pendingTransit, transit, failedTransfer, failedRegistration, failedNameserver, transferedOut, unknown Grund für den Status, gesetzt bei suspended, failed und attention, sonst optional.
abuseHold, verificationPending, paymentHold, registryHold, registrarHold, nsFailed, registrationRejected, transferRejected, expiredNoRenewal, restorePending, customerCanceled, registryDeleted, unmappedRegistrarStatus, unexpectedTransition, notInRegistrarAccount, expiryUnresolved, deleteFailedAtRegistrar, renewFailedAtRegistrar, eventContradictsRegistrar, reconcileDeadlineExceeded, zoneConflict, null Empfohlene nächste Handlung für den Kunden, z. B. renew oder fixNameservers; none, wenn nichts zu tun ist.
none, wait, renew, restore, verifyContact, confirmTransferOut, fixNameservers, revokeCancellation, payInvoice, retryOrder, registerAgain, contactSupport Was this page helpful?