REST API for dynv6 (0.2.0)

Download OpenAPI specification:Download

This is a preview of our HTTP REST API for dynv6.com. Currently, we're supporting updates to zones and records (which should cover the bulk of use cases).

Feel free to drop us a note if you find a bug or if you miss a feature.

Authentication

Bearer

To authenticate with the REST API you first need to create an HTTP token. An API key is restricted to your account, i.e. you cannot edit zones and records of other users. You may optionally further restrict an HTTP token to a single zone. You can create as many keys as you wish.

Then add the following header to your HTTP request:

Authorization: Bearer YOUR_TOKEN

(replace YOUR_TOKEN with, well, your token). If the requests sent to our servers contain an invalid token, you'll generally receive a 401 Unauthorized response.

Example with cURL:

curl \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Accept: application/json" \
    https://dynv6.com/api/v2/zones
Security Scheme Type HTTP
HTTP Authorization Scheme bearer

records

Get a list of records

Returns a list of records for the given zone by its ID and is owned by the current user.

Authorizations:
path Parameters
zoneID
required
integer <int64>

ID of the parent zone to fetch the records for

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add a new record

Adds a new record to the given zone owned by the current user.

Authorizations:
path Parameters
zoneID
required
integer <int64>

ID of the parent zone to fetch the records for

Request Body schema: application/json

Record to add.

name
required
string <hostname>
priority
integer <int64> [ 0 .. 65535 ]

The priority field defines an order. Given multiple records with a priority, the ones with lower values will generally be preferred. Usually, a client fetches all records, sorts them by priority and tries one after the other.

Note: The priority field is currently only supported for MX and SRV records. Other record types silently ignore this field.

port
integer <int64> [ 0 .. 65535 ]

The port the target port for a SRV record. Other record types silently ignore this field.

weight
integer <int64> [ 0 .. 65535 ]

The weight the weight for a SRV record. Other record types silently ignore this field.

flags
integer

The flags field represents a bit-field used for extensions for CAA records. RFC 8659 currently only specifies a value of 128 as issuer critical.

Note: This field is only supported for CAA records. Other record types silently ignore this field.

tag
string
Enum: "issue" "issuewild" "iodef"

Note: This field is only supported for CAA records. Other record types silently ignore this field.

data
required
string

The value (or payload) for a record. For CNAME, MX, SRV records, this might be a hostname, or an IP address for A and AAAA records, etc.

type
required
string
Enum: "A" "AAAA" "CAA" "CNAME" "MX" "SPF" "SRV" "TXT"

Responses

Request samples

Content type
application/json
{
  • "name": "example.com",
  • "priority": 0,
  • "port": 0,
  • "weight": 0,
  • "flags": 0,
  • "tag": "issue",
  • "data": "string",
  • "type": "A"
}

Response samples

Content type
application/json
{
  • "expandedData": "string",
  • "id": 0,
  • "zoneID": 0,
  • "type": "A"
}

Get details for a record

Returns details of the specified record by its ID that the current user has access to.

Authorizations:
path Parameters
zoneID
required
integer <int64>

ID of the parent zone under which the record will be created.

recordID
required
integer <int64>

ID of the record in question.

Responses

Response samples

Content type
application/json
{
  • "expandedData": "string",
  • "id": 0,
  • "zoneID": 0,
  • "type": "A"
}

Update an existing record

Updates the given record based on the ID supplied and owned by the current user.

Authorizations:
path Parameters
zoneID
required
integer <int64>

ID of the parent zone under which the record will be created.

recordID
required
integer <int64>

ID of the record in question.

Responses

Response samples

Content type
application/json
{
  • "expandedData": "string",
  • "id": 0,
  • "zoneID": 0,
  • "type": "A"
}

Delete a record

Deletes the given record based on the ID supplied and owned by the current user.

Authorizations:
path Parameters
zoneID
required
integer <int64>

ID of the parent zone under which the record will be created.

recordID
required
integer <int64>

ID of the record in question.

Responses

zones

Get a list of zones

Returns a list of zones that the user has access to.

Authorizations:

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Register a new zone

Registers a new zone for the current user.

Authorizations:
Request Body schema: application/json

Zone to register

name
required
string <hostname>

The full-qualified domain name for the new zone.

ipv4address
string <ipv4>

Primary IPv4 address (A record) for the new zone.

ipv6prefix
string <ipv6>

Primary IPv6 address or prefix (AAAA record) for the new zone.

Responses

Request samples

Content type
application/json
{
  • "name": "example.com",
  • "ipv4address": "192.168.0.1",
  • "ipv6prefix": "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "example.com",
  • "ipv4address": "192.168.0.1",
  • "ipv6prefix": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get details of a zone

Returns details of a specific zone by its ID that the current user has access to.

Authorizations:
path Parameters
id
required
integer <int64>

ID of the zone to delete

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "example.com",
  • "ipv4address": "192.168.0.1",
  • "ipv6prefix": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Update an existing zone

Updates a single zone based on the ID supplied and owned by the current user.

Authorizations:
path Parameters
id
required
integer <int64>

ID of the zone to delete

Request Body schema: application/json

Fields to update on the given zone.

ipv4address
string <ipv4>

Primary IPv4 address (A record) of this zone.

ipv6prefix
string <ipv6>

Primary IPv6 address or prefix (AAAA record) of this zone.

Responses

Request samples

Content type
application/json
{
  • "ipv4address": "192.168.0.1",
  • "ipv6prefix": "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
}

Response samples

Content type
application/json
{
  • "error":
    {
    }
}

Delete the zone

Deletes a single zone and all associated records based on the ID supplied.

Authorizations:
path Parameters
id
required
integer <int64>

ID of the zone to delete

Responses

Get details of a zone by its name

Returns details of a specific zone by its name that the current user has access to.

Authorizations:
path Parameters
name
required
string <hostname>

name of the zone to fetch

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "example.com",
  • "ipv4address": "192.168.0.1",
  • "ipv6prefix": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}
</