Create a Zone

Use this API call to create a new DNS Zone.

Requires the dns-manage permission.

query
  • include

    Accepted Values: creators

  • sort

    Sorts can be performed on any field - see sorting

  • filter

    Collections of resources can be filtered based on certain criteria - see filtering 

Arguments
  • origin
    string

    The Zone origin. Generally this is expressed as sub.root.tld or root.tld.

  • hosted
    bool

    If the new zone is to be hosted by Cycle this must be true, or if not false.

Returns

Returns a DNS zone resource (the one you just created), otherwise returns an Error.

POST /v1/dns/zones/

Example Request
$ curl \
https://api.cycle.io/v1/dns/zones \
-H
"Authorization: Bearer API_KEY"
\
-H
"X-HUB-ID: HUB_ID"
\
-H "Content-Type: application/json" \
-d '{"origin":"mydomain.com","hosted":true}' \
-X POST
Example Response
{
"data": {
"id": "5a14de0a78ecdb000128b9ec",
"hub_id": "6e43de0a78ecdb000129b8ec",
"origin": "domain.com",
"hosted": true,
"creator": {
"type": "account",
"id": "6e43de0a78ecdb000129b8ec"
},
"state": {
"changed": "2019-05-27T22:09:50.393Z",
"current": "live"
},
"events": {
"last_verification": "2019-05-27T22:09:50.375Z",
"verified": "2019-05-27T22:09:50.375Z",
"created": "2019-05-27T22:09:50.375Z",
"updated": "0001-01-01T00:00:00Z",
"deleted": "0001-01-01T00:00:00Z"
}
}
}