Skip to content

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.

FieldTypeRequiredDefaultDescription
zone_namestringYesnoneDomain name.
zone_typestringNoNATIVENATIVE or MASTER. SLAVE (secondary DNS) is not available at the moment and returns 403 Secondary DNS is not available at the moment.
create_default_recordsbooleanNofalseAuto-create A/MX/etc. defaults.
transfer_domainbooleanNofalseAlso transfer the domain to Gigahost. See Transfers for what each TLD needs.
auth_codestringIf transferringnoneAuth code from the losing registrar, or a Norid one-time token for .no. Not used for .uk.
use_existing_nsbooleanNofalseKeep the existing NS records.
bash
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.

FieldTypeRequiredDefaultDescription
record_valuestringYesnoneThe value (IP, hostname, TXT string…).
record_namestringNo@The subdomain or @ for the root.
record_typestringNoAA, AAAA, CNAME, MX, TXT, NS, SRV, …
record_ttlnumberNo3600TTL in seconds.
record_prioritynumberFor MXnonePriority for MX records.
bash
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.

ParamWhereDescription
record_idURLRecord ID.
nameQueryRecord name (e.g. www).
typeQueryRecord type (e.g. A).
bash
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 ​

FieldTypeRequiredDefaultDescription
target_urlstringYesnoneValid URL to redirect to.
sourcestringNo@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.

FieldTypeDescription
sourcestringSubdomain or @.
target_urlstringNew target URL.

DELETE /dns/zones/{zone_id}/redirect ​

Delete a redirect (and its backing A records).

bash
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:

FieldTypeDescription
prefixstringe.g. 198.51.100.
ip_versionstringipv4.
zone_namestringe.g. 100.51.198.in-addr.arpa.

IPv6 (routed /48):

FieldTypeDescription
prefixstringe.g. 2001:db8::.
ip_versionstringipv6.
zone_namestringe.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.

bash
curl https://api.gigahost.no/api/v0/dns/domains/check/example.no

data 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.

ParamTypeDescription
org_numberstring9-digit organisation number.

Returns the company name, address, postal code and city.

Gigahost Docs

This site is currently in development.
Enter the password to continue.