Skip to content

Domains API ​

Register, transfer and manage domains. DNS records are in the DNS API, and the TLDs on offer and their prices in GET /dns/pricing.

All endpoints require Bearer-token authentication.

Registration ​

POST /dns/domains/register ​

Register a new domain. The fields depend on the TLD: .no below, other TLDs after it. An account under review gets 400 Your account is currently under review and domain orders are temporarily disabled.

.no domains ​

Common fields:

FieldTypeRequiredDefaultDescription
domain_namestringYesnoneThe full domain (example.no).
emailstringYesnoneRegistrant email.
registrant_typestringYesnoneorganization or person.
use_gigahost_nsbooleanNotrueIf false, you must provide your own NS list.
nameserversarrayIf use_gigahost_ns is falsenoneAt least 2 hostnames.

Organization-specific:

FieldTypeDescription
applicant_namestringMax 255 chars.
org_numberstring9-digit Norwegian org. number.
company_namestringMax 255 chars.
zip_codestring
citystring

Person-specific:

FieldTypeDescription
pidstringNorwegian personal identifier in N.PRI.12345678 format.
first_namestring
last_namestring
bash
curl -X POST https://api.gigahost.no/api/v0/dns/domains/register \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "domain_name": "example.no",
    "registrant_type": "organization",
    "email": "[email protected]",
    "applicant_name": "Acme AS",
    "org_number": "999999999",
    "company_name": "Acme AS",
    "zip_code": "0000",
    "city": "Oslo"
  }'

Response: meta.message Domain registered successfully! You will receive a confirmation email shortly. and data with zone_id, domain_name, expires_at and status.

Other TLDs ​

FieldTypeRequiredDescription
domain_namestringYesThe full domain (example.com).
registrantobjectYesThe domain holder (below).
admin_contact, tech_contact, billing_contactobjectNoSame shape as registrant. Each one left out uses the registrant.
whois_privacybooleanNoHide the holder's details in WHOIS. Not allowed for .fi and .uk.
use_gigahost_nsbooleanNoDefault true. If false, send nameservers.
nameserversarrayIf use_gigahost_ns is falseAt least 2 hostnames.

registrant fields: first_name, last_name, address1, city, postal_code, country_code (2 letters), email and phone (+47.12345678 format) are required. org_name is the organisation, if any. registrant_number is the identification number some TLDs need.

bash
curl -X POST https://api.gigahost.no/api/v0/dns/domains/register \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "domain_name": "example.com",
    "registrant": {
      "first_name": "Ola",
      "last_name": "Nordmann",
      "org_name": "Acme AS",
      "address1": "1 Example Street",
      "city": "Oslo",
      "postal_code": "0000",
      "country_code": "NO",
      "email": "[email protected]",
      "phone": "+47.12345678"
    },
    "whois_privacy": true
  }'

Rules per TLD. Breaking one returns 400 with a message that names the rule:

TLDRule
.esregistrant_number of 5 to 20 characters: passport, driving licence, national ID or company number.
.itregistrant_number: VAT or organisation number for companies, personal identification number for individuals.
.dkregistrant_number (CVR or company registration number) when org_name is set.
.se, .nuregistrant_number for every holder: organisation number, or personal identity or passport number.
.firegistrant_number in the format for the holder: A valid Finnish business ID (Y-tunnus, e.g. 1234567-8) is required…, a Finnish personal identity code, a company registration number, or a date of birth (YYYY-MM-DD) for individuals outside Finland. The technical contact must be an organisation: The technical contact for .fi domains must be an organization (org_name is required). No WHOIS privacy.
.fr, .re, .pm, .yt, .tf, .wfHolder and administrative contact must be resident in the EU/EEA or Switzerland: .fr domains can only be registered to a person or organization resident in the EU/EEA or Switzerland.
.beA VAT number is required when a .be domain is registered to an organization in the EU/EEA.
.nlDomain names with special characters (IDN) are not available under .nl. The holder must approve the registration from an email within 7 days, or it is cancelled.
.ukNo WHOIS privacy.

Response: meta.message Domain registered successfully. and data with zone_id, domain_name, order_id, expires_at and status.

Transfers ​

A transfer to Gigahost starts from POST /dns/zones with transfer_domain: true, which creates the zone and starts the transfer in one call. For a zone that already exists on your account and is not registered with us, use POST /dns/domains/transfer with zone_name and auth_code.

  • .no: send the auth code from the current registrar, or a one-time token that Norid emails to the domain holder (see below).
  • .uk: no auth code. The response is 201 with ips_tag in meta; ask your current registrar to change the domain's IPS tag to that value to complete the transfer.
  • .fr and the other AFNIC TLDs: the auth code must be at least 12 characters with an upper case letter, a lower case letter and a digit.
  • Other TLDs: send auth_code and a registrant object as for registration (first_name, last_name and email at least), plus the same per-TLD fields.

Without auth_code (except for .uk) the request fails with 400 Auth code must be provided. A domain that is already being transferred, by you or in a mass transfer, returns 409 A transfer for this domain is already in progress. An account under review gets 400 Your account is currently under review and domain transfers are temporarily disabled.

POST /dns/domains/request-token ​

Ask Norid to email a one-time token to the address registered on a .no domain. Use the token as auth_code. The zone does not have to exist yet.

FieldTypeDescription
zone_namestringThe .no domain.
Statusmeta.message
200A one-time token has been sent to the email address registered on the domain.
200A one-time token has already been requested for this domain. (with already_requested: true)
400A one-time token can only be requested for .no domains.
409A transfer for this domain is already in progress.
429Too many one-time token requests. Please try again tomorrow. (daily limits per account and per domain)

Mass transfer of .no domains ​

Move up to 200 .no domains in one request, from a list or straight from a Domeneshop account. The domains are transferred one by one in the background and you get an email with the result when the batch is done. The panel side is described in Mass transfer.

Changes need read/write DNS access to the whole account; an API key limited to selected zones can only list. Besides the review message above they can return 400 DNS services are not available to this account. or Incomplete account profile. Please complete your profile to enable DNS services.

GET /dns/domains/masstransfer ​

Every open transfer item plus those finished in the last 7 days. Each item has item_id, batch_id, zone_id, zone_name, display_name, status, message, source (manual or domeneshop), switch_ns, token_requested, created, updated and expires_at.

statusMeaning
awaiting_codeWaiting for the one-time code. expires_at is 48 hours after created.
queued, processingWaiting for or being transferred.
doneTransferred.
registry_pendingAccepted by Norid and waiting for approval; Gigahost completes it.
failed, expired, abortedNot transferred; message says why.

POST /dns/domains/masstransfer ​

FieldTypeDescription
itemsarrayUp to 200 entries: zone_name, auth_code (at most 255 characters), request_token (true to have Norid email a one-time code instead) and switch_ns.
switch_nsbooleanDefault for entries without their own switch_ns: true moves the domain to Gigahost nameservers after the transfer, false keeps its current nameservers.

Returns meta.message N domains queued for transfer, M waiting for a one-time code. and data with batch_id, accepted, awaiting and rejected (zone_name and reason). Entries are rejected one at a time, for example with Only .no domains are supported for now., The domain is already registered with us., The domain is in use by another account. or A transfer for this domain is already in progress.

Domains in awaiting need their code sent with PUT within 48 hours.

POST /dns/domains/masstransfer/domeneshop ​

Read the domains, DNS records and web redirects of a Domeneshop account. Send api_token and api_secret from Domeneshop, or username and password. Nothing about the login is stored.

data holds import_id and domains, each with zone_name, display_name, supported, available, reason, on_domeneshop_ns, record_count, skipped_records, redirect_count, framed_count and expiry_date.

Statusmeta.message
400Domeneshop asks for a two-factor code. Use an API key instead. (with otp_required: true)
400Could not log in to Domeneshop. Check the username and password.
400Could not read the domain list from Domeneshop. Check the API key.
502Domeneshop could not be reached. Please try again later.

POST /dns/domains/masstransfer/import ​

FieldTypeDescription
import_idnumberFrom the Domeneshop read. Valid for 1 hour.
zone_namesarrayThe domains to move, up to 200.

Creates the zones, copies the DNS records and redirects of domains on Domeneshop nameservers, and has Norid email a one-time code to each domain holder. Domains on Domeneshop nameservers move to Gigahost nameservers after the transfer; domains on other nameservers keep them. Returns data with batch_id, accepted, rejected and redirects_created. An expired import returns 404 The import has expired. Please connect to Domeneshop again.

PUT /dns/domains/masstransfer ​

Send the one-time codes.

FieldTypeDescription
codesarrayEntries with item_id and auth_code.

Returns meta.message N domains queued for transfer. and data.queued. If none of the items is waiting for a code: 400 No codes were saved. The domains may no longer be waiting for a code.

POST /dns/domains/masstransfer/{item_id}/token ​

Send the one-time code again. Returns 200 A one-time code has been sent to the email address registered on the domain., or 429 Too many one-time code requests for this domain today. Please try again tomorrow.

DELETE /dns/domains/masstransfer/{item_id} ​

Abort a transfer that is still waiting for a code or queued. Returns 200 The transfer was aborted., or 400 This transfer is already being processed and can no longer be aborted.

Registrant ​

GET /dns/zones/{zone_id}/registrant ​

Retrieve registrant contact info from Norid. Registered .no domains only.

PUT /dns/zones/{zone_id}/registrant ​

Change the registrant. Same payload as registration, plus an explicit agree_to_terms boolean. A registrant change creates an order and extends the domain by 1 year.

.fi, .be and the AFNIC TLDs (.fr, .re, .pm, .yt, .tf, .wf) are refused with 400 Registrant change for .fi domains must be handled by support. Please contact us. (with the TLD in the message).

PUT /dns/zones/{zone_id}/registrant-email ​

Update the registrant email, optionally turning on WHOIS protection.

FieldTypeRequiredDefaultDescription
emailstringYesnoneNew email address.
enable_protectionbooleanNofalseIf true, Norid receives a forwarding alias via whoisbeskyttelse.no instead of your real address.

.be domains are refused with 400 The email address of .be domains cannot be changed here. Please contact support.

PUT /dns/zones/{zone_id}/ips-tag ​

Transfer a .uk domain to another registrar. .uk has no auth code: the domain moves when its IPS tag is changed to the new registrar's tag. Not available to API keys or read-only users.

FieldTypeDescription
tagstringThe new registrar's IPS tag: letters, digits and hyphens.

Returns 200 The IPS tag change to TAG has been requested. The domain moves to the new registrar once the registry has processed it, usually within one working day. Errors:

  • 400 A valid IPS tag is required (letters, digits and hyphens).
  • 400 The domain already uses this IPS tag. Enter the IPS tag of the registrar you are moving to.
  • 400 IPS tags only apply to .uk domains registered with us.
  • 400 The domain cannot be transferred in its current state.
  • 409 A transfer to another registrar is already in progress for this domain.
  • 400 The registry rejected the IPS tag change. Check that the tag is correct, or contact support.

Nameservers ​

PUT /dns/zones/{zone_id}/nameservers ​

Update the nameservers Norid lists for a registered domain.

FieldTypeDescription
nameserversarrayAt least 2 hostnames.

The API verifies each candidate is authoritative for the zone before submitting the change. The zone's external_dns flag is updated automatically based on whether the new NS list points at Gigahost.

Auto-renew ​

PUT /dns/zones/{zone_id}/auto-renew ​

FieldTypeDescription
auto_renewnumber0 to disable, 1 to enable.

Auto-renew drives billing. Turning it off credits an open renewal invoice that is not paid; a renewal that is already paid is still carried out once. Turning it on again resumes the renewal and invoices it right away if it is due. meta.message says what happened, for example:

  • Auto-renewal disabled. Invoice #N for the upcoming renewal has been credited. The domain will expire on DD.MM.YYYY.
  • Auto-renewal disabled. The upcoming renewal is already paid, so the domain will be renewed once more and then expire on DD.MM.YYYY.
  • Auto-renewal enabled. The next renewal will be invoiced on DD.MM.YYYY.
  • Auto-renewal enabled. Invoice #N for the renewal until DD.MM.YYYY has been sent to you.

Errors:

Statusmeta.message
403Auto-renewal can only be modified for registered domains.
409Auto-renewal cannot be changed while the domain is pending at the registry.
409The domain has expired and can no longer be set to renew automatically. Please contact support to restore it.
500Unable to credit the open renewal invoice. Auto-renewal was not changed, please contact support.

DNSSEC ​

GET /dns/zones/{zone_id}/ds-records ​

Get DS records for the zone. Response depends on nameserver type:

  • Gigahost nameservers: DS records in the standard format, ready to publish at the parent.
  • External nameservers: configuration instructions instead of records.

ds_records is a text block with one DS record per line (keyTag algorithm digestType digest).

GET /dns/zones/{zone_id}/ds-records/external ​

For externally hosted domains, returns DS records you have previously submitted, and requires_dnskey: true when the registry for the TLD needs the public key itself (.be, .ch, .cz, .de, .ee, .eu, .li and .nl).

POST /dns/zones/{zone_id}/ds-records/external ​

Submit DS records from your external nameservers to the registry. The set you send replaces the records at the registry.

FieldTypeDescription
ds_recordsarrayList of DS record objects (below).

Each ds_records[i]:

FieldTypeDescription
keyTagnumber0–65535.
algnumberOne of: 5, 7, 8, 10, 13, 14, 15, 16.
digestTypenumber1 (SHA-1), 2 (SHA-256), 4 (SHA-384).
digeststringHexadecimal: 40 characters for type 1, 64 for type 2, 96 for type 4.
publicKeystringThe DNSKEY public key, Base64. Required where requires_dnskey is true, ignored elsewhere.
keyTypenumber257 (key signing key, default) or 256 (zone signing key).

Domains outside .no accept digest types 1 and 2 only: Digest type 4 is not supported for this domain. Please provide a SHA-256 (type 2) DS record. A missing key where one is required: The registry for this domain requires the DNSKEY public key. Please add the public key for key tag N.

PUT /dns/zones/{zone_id}/dnssec ​

Enable or disable DNSSEC for the zone.

FieldTypeDescription
enablenumber0 to disable, 1 to enable.

Behaviour depends on nameserver type:

  • Gigahost NS: keys are auto-created and DS records are submitted to the registry for you.
  • External NS: the flag is set; you submit your own DS records via the endpoints above.

Gigahost Docs

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