Create a DNS Zone
Note: Only contract administrators, owners, and users with "accessAndManageDns" privilege can create and manage DNS zones and DNS records via API. You can also set User privileges in the DCD.
Prerequisite: You need an IONOS Cloud account with API credentials configured with the appropriate permissions.
To create a DNS zone with Cloud DNS API, follow this step:
- Perform a POST request with the domain or subdomain, a description of your DNS zone (optional), and the DNS zone status (enable), true or false.
Result: On a successful POST request, you receive a response containing the DNS zone UUID, Name Servers, and the request status.
curl --location \
--request POST 'https://dns.de-fra.ionos.com/zones' \
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJraWQiO' \
--header 'Content-Type: application/json' \
--data '{
"properties": {
"zoneName": "example.com",
"description": "example of zone creation",
"enabled": true
}
}'
202 Successful operation
{
"id": "2a4428b3-dbe0-4357-9c02-609025b3a40f",
"metadata": {
"createdDate": "2023-03-15T09:58:59.147746133Z",
"lastModifiedDate": "2023-03-15T09:58:59.14774631Z",
"nameservers": [
"ns-ic.ui-dns.com",
"ns-ic.ui-dns.de",
"ns-ic.ui-dns.org",
"ns-ic.ui-dns.biz"
],
"state": "CREATED"
},
"properties": {
"zoneName": "example.com",
"description": "example of zone creation",
"enabled": true
}
}
Field | Type | Description | Example |
---|---|---|---|
id | string | UUID of the newly created DNS zone | 2a4428b3-dbe0-4357-9c02-609025b3a40f |
createdDate | string | DNS zone creation timestamp | 2023-03-15T09:58:59.147746133Z |
lastModifiedDate | string | DNS zone update timestamp | 2023-03-15T09:58:59.147746133Z |
nameservers | array | Name Servers assigned to the DNS zone | "ns-ic.ui-dns.com",
"ns-ic.ui-dns.de",
"ns-ic.ui-dns.org",
"ns-ic.ui-dns.biz" |
state | string | State of the request | CREATED |
Last modified 25d ago