DNS API
All endpoints require Bearer-token authentication.
For domain-level operations (registration, registrant changes, DNSSEC, nameserver updates) see Domains API.
Zones
GET /dns/zones
List every DNS zone on the account.
Each entry includes zone ID, name, type, protection status, registrar, expiry, and a count of records.
POST /dns/zones
Create a new zone.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
zone_name | string | Yes | none | Domain name. |
zone_type | string | No | NATIVE | NATIVE or MASTER. SLAVE (secondary DNS) is not available at the moment and returns 403 Secondary DNS is not available at the moment. |
create_default_records | boolean | No | false | Auto-create A/MX/etc. defaults. |
transfer_domain | boolean | No | false | Also transfer the domain to Gigahost. See Transfers for what each TLD needs. |
auth_code | string | If transferring | none | Auth code from the losing registrar, or a Norid one-time token for .no. Not used for .uk. |
use_existing_ns | boolean | No | false | Keep the existing NS records. |
curl -X POST https://api.gigahost.no/api/v0/dns/zones \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"zone_name": "example.com",
"zone_type": "NATIVE",
"create_default_records": true
}'Import a BIND zone file instead: use multipart/form-data with zone_name and a zone_file field (max 2 MB).
A zone name that already exists returns 400 Zone already exists. A domain that is already being transferred returns 409 A transfer for this domain is already in progress.
DELETE /dns/zones/{zone_id}
Delete a zone. Zones of domains registered with Gigahost are protected and return 403 This zone is protected and cannot be deleted. Please cancel the domain registration first.
Records
Changes to a secondary zone that already exists return 400 This zone is a secondary zone. Its contents are managed by your primary nameserver.
GET /dns/zones/{zone_id}/records
List all records in a zone.
Each record has: id, name, type, value, ttl, priority (for MX).
POST /dns/zones/{zone_id}/records
Create a record.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
record_value | string | Yes | none | The value (IP, hostname, TXT string…). |
record_name | string | No | @ | The subdomain or @ for the root. |
record_type | string | No | A | A, AAAA, CNAME, MX, TXT, NS, SRV, … |
record_ttl | number | No | 3600 | TTL in seconds. |
record_priority | number | For MX | none | Priority for MX records. |
curl -X POST https://api.gigahost.no/api/v0/dns/zones/966/records \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"record_name": "www",
"record_type": "A",
"record_value": "198.51.100.10",
"record_ttl": 3600
}'PUT /dns/zones/{zone_id}/records/{record_id}
Same body as POST. A values must be IPv4, AAAA values IPv6, and MX records need record_priority.
DELETE /dns/zones/{zone_id}/records/{record_id}
Delete a record.
| Param | Where | Description |
|---|---|---|
record_id | URL | Record ID. |
name | Query | Record name (e.g. www). |
type | Query | Record type (e.g. A). |
curl -X DELETE \
"https://api.gigahost.no/api/v0/dns/zones/966/records/abc123?name=www&type=A" \
-H "Authorization: Bearer $TOKEN"Redirects
A redirect sends a subdomain or @ to a URL, through an A record that points to Gigahost's redirect server.
GET /dns/zones/{zone_id}/redirect
List redirects on a zone. Unavailable for externally hosted zones.
POST /dns/zones/{zone_id}/redirect
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
target_url | string | Yes | none | Valid URL to redirect to. |
source | string | No | @ | Subdomain or @ for the root. |
Possible errors:
- Existing A records conflict
- Redirect already exists
- External nameservers configured
- Invalid URL format
PUT /dns/zones/{zone_id}/redirect
Update the target URL.
| Field | Type | Description |
|---|---|---|
source | string | Subdomain or @. |
target_url | string | New target URL. |
DELETE /dns/zones/{zone_id}/redirect
Delete a redirect (and its backing A records).
curl -X DELETE \
"https://api.gigahost.no/api/v0/dns/zones/966/redirect?source=@" \
-H "Authorization: Bearer $TOKEN"Reverse DNS (PTR) zones
For the panel-side walkthrough see Set up reverse DNS (PTR) on a routed /48 IPv6.
POST /dns/zones/ptr
Create a PTR zone.
IPv4:
| Field | Type | Description |
|---|---|---|
prefix | string | e.g. 198.51.100. |
ip_version | string | ipv4. |
zone_name | string | e.g. 100.51.198.in-addr.arpa. |
IPv6 (routed /48):
| Field | Type | Description |
|---|---|---|
prefix | string | e.g. 2001:db8::. |
ip_version | string | ipv6. |
zone_name | string | e.g. 0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa. |
After creating the PTR zone, add records to it with the standard record endpoints, and delegate the prefix to the new nameservers via PUT /servers/{id}/reverse.
Lookups
GET /dns/domains/check/{domain}
Check whether a domain is available, for every TLD Gigahost offers. No authentication is needed.
curl https://api.gigahost.no/api/v0/dns/domains/check/example.nodata holds domain, available and reason, plus pricing (registration_price, renewal_price, currency, min_year and premium, which is true for premium names). A TLD that is not offered returns 400 This TLD is not available for registration. Each IP address can make 5000 lookups a day; past that the call returns 429 Too many domain lookups. Please try again later.
GET /dns/pricing
The TLDs on offer with tld, registration_price, renewal_price, currency, registrar and min_year (the shortest registration term in years). No authentication is needed.
GET /dns/lookup/organization/{org_number}
Norwegian organisation lookup via Brønnøysundregistrene.
| Param | Type | Description |
|---|---|---|
org_number | string | 9-digit organisation number. |
Returns the company name, address, postal code and city.

