POST
/
dns
/
v2
/
zones
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
zone = client.dns.zones.create(
    name="example.com",
)
print(zone.id)
{
  "id": 123,
  "warnings": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Body

application/json
name
string
required

name of DNS zone

Example:

"example.com"

contact
string

email address of the administrator responsible for this zone

enabled
boolean
default:true

If a zone is disabled, then its records will not be resolved on dns servers

expiry
integer

number of seconds after which secondary name servers should stop answering request for this zone

meta
object

arbitrarily data of zone in json format you can specify webhook url and webhook_method here webhook will get a map with three arrays: for created, updated and deleted rrsets webhook_method can be omitted, POST will be used by default

nx_ttl
integer

Time To Live of cache

primary_server
string

primary master name server for zone

refresh
integer

number of seconds after which secondary name servers should query the master for the SOA record, to detect zone changes.

retry
integer

number of seconds after which secondary name servers should retry to request the serial number

serial
integer

Serial number for this zone or Timestamp of zone modification moment. If a secondary name server slaved to this one observes an increase in this number, the slave will assume that the zone has been updated and initiate a zone transfer.

Response

CreateZoneResponse

id
integer
warnings
string[]