DNS Zones API Endpoints

Learn more about our Managed DNS API

Creating API Tokens

To use the DNS API you need to create a new API token. API tokens are part of projects and can be created by clicking on Projects, selecting a project and going to the Security tab. Please store the token somewhere save, as it will be shown only once.

Authentication

The API Token has to be sent with every request as Authorization header as a Bearer token.

Example Header Name: Authorization | Example Header Value: Bearer GeneratedTokenFromSecurityTab

Get DNS Zones

To list all existing DNS zones of that project you can simply send a GET request to the following endpoint.

https://api.nodion.com/v1/dns_zones

Required Headers: Authorization

Example Response:

  {
    "dns_zones": [
      {
        "id": "52be5f1b-fee7-4a42-b668-85890c41be5b",
        "name": "nodionsample.com",
        "created_at": "2023-01-01T10:00:00.000+01:00",
        "updated_at": "2023-01-01T10:00:00.000+01:00",
        "records": [
          {
            "id": "5ed9465f-f8c6-432d-9474-3e9880f6adfe",
            "record_type": "a",
            "name": "@",
            "content": "1.2.3.4",
            "ttl": 3600,
            "prio": null,
            "port": null,
            "weight": null,
            "zone_id": "52be5f1b-fee7-4a42-b668-85890c41be5b",
            "created_at": "2023-01-01T10:00:00.000+01:00",
            "updated_at": "2023-01-01T10:00:00.000+01:00"
          },
          {
            "id": "60a0647b-0b08-4dc0-8d51-4e21c799457c",
            "record_type": "a",
            "name": "*",
            "content": "1.2.3.4",
            "ttl": 3600,
            "prio": null,
            "port": null,
            "weight": null,
            "zone_id": "52be5f1b-fee7-4a42-b668-85890c41be5b",
            "created_at": "2023-01-01T10:00:00.000+01:00",
            "updated_at": "2023-01-01T10:00:00.000+01:00"
          },
          {
            "id": "b4748041-f3b2-40f3-9217-9af016c5937f",
            "record_type": "a",
            "name": "www",
            "content": "1.2.3.4",
            "ttl": 3600,
            "prio": null,
            "port": null,
            "weight": null,
            "zone_id": "52be5f1b-fee7-4a42-b668-85890c41be5b",
            "created_at": "2023-01-01T10:00:00.000+01:00",
            "updated_at": "2023-01-01T10:00:00.000+01:00"
          },
          {
            "id": "d13e85ce-7d04-4770-9197-19f87f35e6a8",
            "record_type": "ns",
            "name": "@",
            "content": "ns1.nodion.com",
            "ttl": 3600,
            "prio": null,
            "port": null,
            "weight": null,
            "zone_id": "52be5f1b-fee7-4a42-b668-85890c41be5b",
            "created_at": "2023-01-01T10:00:00.000+01:00",
            "updated_at": "2023-01-01T10:00:00.000+01:00"
          },
          {
            "id": "f5454bf7-f89b-45a4-981f-7783102fd389",
            "record_type": "ns",
            "name": "@",
            "content": "ns2.nodion.com",
            "ttl": 3600,
            "prio": null,
            "port": null,
            "weight": null,
            "zone_id": "52be5f1b-fee7-4a42-b668-85890c41be5b",
            "created_at": "2023-01-01T10:00:00.000+01:00",
            "updated_at": "2023-01-01T10:00:00.000+01:00"
          }
        ]
      }
    ]
  }

Create DNS Zone

To create a new DNS Zone within that project send a POST request to the following endpoint.

https://api.nodion.com/v1/dns_zones

Required Headers: Authorization

Required Body Parameters:

name – The domain name you would like to use our DNS service for.

Possible Response Codes:

200 – The DNS Zone was created successfully.
400 – Either the name was not provided or is not a fqdn. Please check the response.

Example Response:

  {
    "dns_zone": {
      "id": "52be5f1b-fee7-4a42-b668-85890c41be5b",
      "name": "nodionsample.com",
      "created_at": "2023-01-01T10:00:00.000+01:00",
      "updated_at": "2023-01-01T10:00:00.000+01:00",
      "records": [
        {
          "id": "5ed9465f-f8c6-432d-9474-3e9880f6adfe",
          "record_type": "a",
          "name": "@",
          "content": "1.2.3.4",
          "ttl": 3600,
          "prio": null,
          "port": null,
          "weight": null,
          "zone_id": "52be5f1b-fee7-4a42-b668-85890c41be5b",
          "created_at": "2023-01-01T10:00:00.000+01:00",
          "updated_at": "2023-01-01T10:00:00.000+01:00"
        },
        {
          "id": "60a0647b-0b08-4dc0-8d51-4e21c799457c",
          "record_type": "a",
          "name": "*",
          "content": "1.2.3.4",
          "ttl": 3600,
          "prio": null,
          "port": null,
          "weight": null,
          "zone_id": "52be5f1b-fee7-4a42-b668-85890c41be5b",
          "created_at": "2023-01-01T10:00:00.000+01:00",
          "updated_at": "2023-01-01T10:00:00.000+01:00"
        },
        {
          "id": "b4748041-f3b2-40f3-9217-9af016c5937f",
          "record_type": "a",
          "name": "www",
          "content": "1.2.3.4",
          "ttl": 3600,
          "prio": null,
          "port": null,
          "weight": null,
          "zone_id": "52be5f1b-fee7-4a42-b668-85890c41be5b",
          "created_at": "2023-01-01T10:00:00.000+01:00",
          "updated_at": "2023-01-01T10:00:00.000+01:00"
        },
        {
          "id": "d13e85ce-7d04-4770-9197-19f87f35e6a8",
          "record_type": "ns",
          "name": "@",
          "content": "ns1.nodion.com",
          "ttl": 3600,
          "prio": null,
          "port": null,
          "weight": null,
          "zone_id": "52be5f1b-fee7-4a42-b668-85890c41be5b",
          "created_at": "2023-01-01T10:00:00.000+01:00",
          "updated_at": "2023-01-01T10:00:00.000+01:00"
        },
        {
          "id": "f5454bf7-f89b-45a4-981f-7783102fd389",
          "record_type": "ns",
          "name": "@",
          "content": "ns2.nodion.com",
          "ttl": 3600,
          "prio": null,
          "port": null,
          "weight": null,
          "zone_id": "52be5f1b-fee7-4a42-b668-85890c41be5b",
          "created_at": "2023-01-01T10:00:00.000+01:00",
          "updated_at": "2023-01-01T10:00:00.000+01:00"
        }
      ]
    }
  }

Delete DNS Zone

To delete an existing DNS Zone send a DELETE request to the following endpoint.

https://api.nodion.com/v1/dns_zones/:uuid

Required Headers: Authorization

Example Response:

  {
    "deleted": true
  }

Get DNS Zone Records

To list all existing Records of a DNS zone simply send a GET request to the following endpoint.

https://api.nodion.com/v1/dns_zones/:uuid/records

Optional Query Params:

record_type – To filter for a specific record_type you could provide it as value, for example "a" or "txt".
name – To filter for a specific subdomain you can use the name parameter, for example "www" or "@".
content – If you want to filter for a specific IP, txt value or similar you can use the contant param.

Required Headers: Authorization

Example Response:

  {
    "records": [
      {
        "id": "8231bac6-39f0-4f06-bd6c-076fb9abea9e",
        "record_type": "a",
        "name": "@",
        "content": "1.2.3.4",
        "ttl": 3600,
        "prio": null,
        "port": null,
        "weight": null,
        "created_at": "2023-01-01T10:00:00.000+01:00",
        "updated_at": "2023-01-01T10:00:00.000+01:00"
      },
      {
        "id": "25adc6de-ee1e-4e94-916a-be3f4bcaa586",
        "record_type": "a",
        "name": "*",
        "content": "1.2.3.4",
        "ttl": 3600,
        "prio": null,
        "port": null,
        "weight": null,
        "created_at": "2023-01-01T10:00:00.000+01:00",
        "updated_at": "2023-01-01T10:00:00.000+01:00"
      },
      {
        "id": "843fa60c-dc30-47c4-a818-fee31118a43f",
        "record_type": "a",
        "name": "www",
        "content": "1.2.3.4",
        "ttl": 3600,
        "prio": null,
        "port": null,
        "weight": null,
        "created_at": "2023-01-01T10:00:00.000+01:00",
        "updated_at": "2023-01-01T10:00:00.000+01:00"
      },
      {
        "id": "a10acb05-c76f-4170-9e27-74bb9a6c6cdc",
        "record_type": "ns",
        "name": "@",
        "content": "ns1.nodion.com",
        "ttl": 3600,
        "prio": null,
        "port": null,
        "weight": null,
        "created_at": "2023-01-01T10:00:00.000+01:00",
        "updated_at": "2023-01-01T10:00:00.000+01:00"
      },
      {
        "id": "924f32d4-b10f-47ef-a293-adbc7169e885",
        "record_type": "ns",
        "name": "@",
        "content": "ns2.nodion.com",
        "ttl": 3600,
        "prio": null,
        "port": null,
        "weight": null,
        "created_at": "2023-01-01T10:00:00.000+01:00",
        "updated_at": "2023-01-01T10:00:00.000+01:00"
      }
    ]
  }

Create DNS Zone Record

To create a new Record for a DNS zone simply send a POST request to the following endpoint.

https://api.nodion.com/v1/dns_zones/:uuid/records

Required Headers: Authorization

Required Body Parameters:

record_type – One of the following: a, aaaa, ns, alias, cname, mx, txt, ptr, srv.
name – The subdomain, for example "www". For root level records you can use the @ symbol.
content – The actual content value, for example for A records it would be the IP.
ttl – The desired TTL, can be a number between 60 and 86400.

Possible Response Codes:

200 – The DNS Zone was created successfully.
400 – Either the name was not provided or is not a fqdn. Please check the response.

Example Response:

  {
    "record": {
      "id": "748d688a-3004-4b84-b8b8-8cb2e07c5c71",
      "record_type": "a",
      "name": "www",
      "content": "1.2.3.4",
      "ttl": 60,
      "prio": null,
      "port": null,
      "weight": null,
      "created_at": "2023-02-10T21:32:54.749+01:00",
      "updated_at": "2023-02-10T21:32:54.749+01:00"
    }
  }

Delete DNS Zone Record

To delete an existing Record for a DNS zone simply send a DELETE request to the following endpoint.

https://api.nodion.com/v1/dns_zones/:uuid/records/:record_uuid

Required Headers: Authorization

Example Response:

  {
    "deleted": true
  }