REST API for dynv6 (0.1.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

200

List of records

401

Error: Unauthorized

403

Error: Forbidden

404

Error: Zone not found

get/zones/{zoneID}/records
https://dynv6.com/api/v2/zones/{zoneID}/records

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

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 records. 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 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" "TXT"

Responses

200

Record was created

400

Error: Malformed client data

401

Error: Unauthorized

403

Error: Forbidden

404

Error: Record not found

422

Error: Field value validation failed

post/zones/{zoneID}/records
https://dynv6.com/api/v2/zones/{zoneID}/records

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "example.com",
  • "priority": 0,
  • "flags": 0,
  • "tag": "issue",
  • "data": "string",
  • "type": "A"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "example.com",
  • "priority": 0,
  • "flags": 0,
  • "tag": "issue",
  • "data": "string",
  • "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

200

Record

401

Error: Unauthorized

403

Error: Forbidden

404

Error: Record or zone not found

get/zones/{zoneID}/records/{recordID}
https://dynv6.com/api/v2/zones/{zoneID}/records/{recordID}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "example.com",
  • "priority": 0,
  • "flags": 0,
  • "tag": "issue",
  • "data": "string",
  • "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

200

Updated record

401

Error: Unauthorized

403

Error: Forbidden

404

Error: Record or zone not found

422

Error: Field value validation failed

patch/zones/{zoneID}/records/{recordID}
https://dynv6.com/api/v2/zones/{zoneID}/records/{recordID}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "name": "example.com",
  • "priority": 0,
  • "flags": 0,
  • "tag": "issue",
  • "data": "string",
  • "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

204

Record was successfully deleted

401

Error: Unauthorized

403

Error: Forbidden

404

Error: Record or zone not found

delete/zones/{zoneID}/records/{recordID}
https://dynv6.com/api/v2/zones/{zoneID}/records/{recordID}

zones

Get a list of zones

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

Authorizations:

Responses

200

List of zones

401

Error: Unauthorized

403

Error: Forbidden

get/zones
https://dynv6.com/api/v2/zones

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

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

200

Created zone

401

Error: Unauthorized

403

Error: Forbidden

422

Error: Field value validation failed

post/zones
https://dynv6.com/api/v2/zones

Request samples

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

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "name": "example.com",
  • "ipv4address": "192.168.0.1",
  • "ipv6prefix": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
  • "createdAt": "2020-06-17T10:52:59Z",
  • "updatedAt": "2020-06-17T10:52:59Z"
}

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

200

zone response.

401

Error: Unauthorized

403

Error: Forbidden

404

Error: Zone not found

get/zones/{id}
https://dynv6.com/api/v2/zones/{id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "name": "example.com",
  • "ipv4address": "192.168.0.1",
  • "ipv6prefix": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
  • "createdAt": "2020-06-17T10:52:59Z",
  • "updatedAt": "2020-06-17T10:52:59Z"
}

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

200

Zone was updated successfully

401

Error: Unauthorized

403

Error: Forbidden

404

Error: Zone not found

422

Error: Field value validation failed

patch/zones/{id}
https://dynv6.com/api/v2/zones/{id}

Request samples

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

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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

204

Zone was successfully deleted

401

Error: Unauthorized

403

Error: Forbidden

404

Error: Zone not found

delete/zones/{id}
https://dynv6.com/api/v2/zones/{id}

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

200

Zone response

401

Error: Unauthorized

403

Error: Forbidden

404

Error: Zone not found

get/zones/by-name/{name}
https://dynv6.com/api/v2/zones/by-name/{name}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "name": "example.com",
  • "ipv4address": "192.168.0.1",
  • "ipv6prefix": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
  • "createdAt": "2020-06-17T10:52:59Z",
  • "updatedAt": "2020-06-17T10:52:59Z"
}