ListRecords

ListRecords returns all records for a zone.

Endpoint: GET /v4/domains/{domainName}/records

Parameters:


domainName
(path parameters)

string

DomainName is the zone to list the records for.


perPage

int32

Per Page is the number of records to return per request. Per Page defaults to 1,000.


page

int32

Page is which page to return


Response:


records

Records contains the records in the zone


nextPage

int32

NextPage is the identifier for the next page of results. It is only populated if there is another page of results after the current page.


lastPage

int32

LastPage is the identifier for the final page of results. It is only populated if there is another page of results after the current page.


Example:

curl -u 'username:token' 'https://api.dev.name.com/v4/domains/example.org/records'
{
    "records": [
        {
            "id": 12345,
            "domainName": "example.org",
            "host": "www",
            "fqdn": "www.example.org",
            "type": "A",
            "answer": "10.0.0.1",
            "ttl": 300
        }
    ]
}					

GetRecord

GetRecord returns details about an individual record.

Endpoint: GET /v4/domains/{domainName}/records/{id}

Parameters:


domainName
(path parameters)

string

DomainName is the zone the record exists in


id
(path parameters)

int32

ID is the server-assigned unique identifier for this record


Response:


id
(read only)

int32

Unique record id. Value is ignored on Create, and must match the URI on Update.


domainName
(read only)

string

DomainName is the zone that the record belongs to.


host

string

Host is the hostname relative to the zone: e.g. for a record for blog.example.org, domain would be "example.org" and host would be "blog". An apex record would be specified by either an empty host "" or "@". A SRV record would be specified by "_{service}._{protocal}.{host}": e.g. "_sip._tcp.phone" for _sip._tcp.phone.example.org.


fqdn
(read only)

string

FQDN is the Fully Qualified Domain Name. It is the combination of the host and the domain name. It always ends in a ".". FQDN is ignored in CreateRecord, specify via the Host field instead.


type

string

Type is one of the following: A, AAAA, ANAME, CNAME, MX, NS, SRV, or TXT.


answer

string

Answer is either the IP address for A or AAAA records; the target for ANAME, CNAME, MX, or NS records; the text for TXT records. For SRV records, answer has the following format: "{weight} {port} {target}" e.g. "1 5061 sip.example.org".


ttl

uint32

TTL is the time this record can be cached for in seconds. Name.com allows a minimum TTL of 300, or 5 minutes.


priority

uint32

Priority is only required for MX and SRV records, it is ignored for all others.


Example:

curl -u 'username:token' 'https://api.dev.name.com/v4/domains/example.org/records/12345'
{
    "id": 12345,
    "domainName": "example.org",
    "host": "www",
    "fqdn": "www.example.org",
    "type": "A",
    "answer": "10.0.0.1",
    "ttl": 300
}					

CreateRecord

CreateRecord creates a new record in the zone.

Endpoint: POST /v4/domains/{domainName}/records

Parameters:


id
(read only)

int32

Unique record id. Value is ignored on Create, and must match the URI on Update.


domainName
(path parameters)

string

DomainName is the zone that the record belongs to.


host

string

Host is the hostname relative to the zone: e.g. for a record for blog.example.org, domain would be "example.org" and host would be "blog". An apex record would be specified by either an empty host "" or "@". A SRV record would be specified by "_{service}._{protocal}.{host}": e.g. "_sip._tcp.phone" for _sip._tcp.phone.example.org.


fqdn
(read only)

string

FQDN is the Fully Qualified Domain Name. It is the combination of the host and the domain name. It always ends in a ".". FQDN is ignored in CreateRecord, specify via the Host field instead.


type
(required)

string

Type is one of the following: A, AAAA, ANAME, CNAME, MX, NS, SRV, or TXT.


answer
(required)

string

Answer is either the IP address for A or AAAA records; the target for ANAME, CNAME, MX, or NS records; the text for TXT records. For SRV records, answer has the following format: "{weight} {port} {target}" e.g. "1 5061 sip.example.org".


ttl

uint32

TTL is the time this record can be cached for in seconds. Name.com allows a minimum TTL of 300, or 5 minutes.


priority

uint32

Priority is only required for MX and SRV records, it is ignored for all others.


Response:


id
(read only)

int32

Unique record id. Value is ignored on Create, and must match the URI on Update.


domainName
(read only)

string

DomainName is the zone that the record belongs to.


host

string

Host is the hostname relative to the zone: e.g. for a record for blog.example.org, domain would be "example.org" and host would be "blog". An apex record would be specified by either an empty host "" or "@". A SRV record would be specified by "_{service}._{protocal}.{host}": e.g. "_sip._tcp.phone" for _sip._tcp.phone.example.org.


fqdn
(read only)

string

FQDN is the Fully Qualified Domain Name. It is the combination of the host and the domain name. It always ends in a ".". FQDN is ignored in CreateRecord, specify via the Host field instead.


type

string

Type is one of the following: A, AAAA, ANAME, CNAME, MX, NS, SRV, or TXT.


answer

string

Answer is either the IP address for A or AAAA records; the target for ANAME, CNAME, MX, or NS records; the text for TXT records. For SRV records, answer has the following format: "{weight} {port} {target}" e.g. "1 5061 sip.example.org".


ttl

uint32

TTL is the time this record can be cached for in seconds. Name.com allows a minimum TTL of 300, or 5 minutes.


priority

uint32

Priority is only required for MX and SRV records, it is ignored for all others.


Example:

curl -u 'username:token' 'https://api.dev.name.com/v4/domains/example.org/records' -X POST -H 'Content-Type: application/json' --data '{"host":"www","type":"A","answer":"10.0.0.1","ttl":300}'
{
    "id": 12345,
    "domainName": "example.org",
    "host": "www",
    "fqdn": "www.example.org",
    "type": "A",
    "answer": "10.0.0.1",
    "ttl": 300
}					

UpdateRecord

UpdateRecord replaces the record with the new record that is passed.

Endpoint: PUT /v4/domains/{domainName}/records/{id}

Parameters:


id
(path parameters)

int32

Unique record id. Value is ignored on Create, and must match the URI on Update.


domainName
(path parameters)

string

DomainName is the zone that the record belongs to.


host

string

Host is the hostname relative to the zone: e.g. for a record for blog.example.org, domain would be "example.org" and host would be "blog". An apex record would be specified by either an empty host "" or "@". A SRV record would be specified by "_{service}._{protocal}.{host}": e.g. "_sip._tcp.phone" for _sip._tcp.phone.example.org.


fqdn
(read only)

string

FQDN is the Fully Qualified Domain Name. It is the combination of the host and the domain name. It always ends in a ".". FQDN is ignored in CreateRecord, specify via the Host field instead.


type
(required)

string

Type is one of the following: A, AAAA, ANAME, CNAME, MX, NS, SRV, or TXT.


answer
(required)

string

Answer is either the IP address for A or AAAA records; the target for ANAME, CNAME, MX, or NS records; the text for TXT records. For SRV records, answer has the following format: "{weight} {port} {target}" e.g. "1 5061 sip.example.org".


ttl

uint32

TTL is the time this record can be cached for in seconds. Name.com allows a minimum TTL of 300, or 5 minutes.


priority

uint32

Priority is only required for MX and SRV records, it is ignored for all others.


Response:


id
(read only)

int32

Unique record id. Value is ignored on Create, and must match the URI on Update.


domainName
(read only)

string

DomainName is the zone that the record belongs to.


host

string

Host is the hostname relative to the zone: e.g. for a record for blog.example.org, domain would be "example.org" and host would be "blog". An apex record would be specified by either an empty host "" or "@". A SRV record would be specified by "_{service}._{protocal}.{host}": e.g. "_sip._tcp.phone" for _sip._tcp.phone.example.org.


fqdn
(read only)

string

FQDN is the Fully Qualified Domain Name. It is the combination of the host and the domain name. It always ends in a ".". FQDN is ignored in CreateRecord, specify via the Host field instead.


type

string

Type is one of the following: A, AAAA, ANAME, CNAME, MX, NS, SRV, or TXT.


answer

string

Answer is either the IP address for A or AAAA records; the target for ANAME, CNAME, MX, or NS records; the text for TXT records. For SRV records, answer has the following format: "{weight} {port} {target}" e.g. "1 5061 sip.example.org".


ttl

uint32

TTL is the time this record can be cached for in seconds. Name.com allows a minimum TTL of 300, or 5 minutes.


priority

uint32

Priority is only required for MX and SRV records, it is ignored for all others.


Example:

curl -u 'username:token' 'https://api.dev.name.com/v4/domains/example.org/records/12345' -X PUT -H 'Content-Type: application/json' --data '{"host":"www","type":"A","answer":"10.0.0.1","ttl":300}'
{
    "id": 12345,
    "domainName": "example.org",
    "host": "www",
    "fqdn": "www.example.org",
    "type": "A",
    "answer": "10.0.0.1",
    "ttl": 300
}					

DeleteRecord

DeleteRecord deletes a record from the zone.

Endpoint: DELETE /v4/domains/{domainName}/records/{id}

Parameters:


domainName
(path parameters)

string

DomainName is the zone that the record to be deleted exists in.


id
(path parameters)

int32

ID is the server-assigned unique identifier for the Record to be deleted. If the Record with that ID does not exist in the specified Domain, an error is returned.


Response:

Empty response.


Example:

curl -u 'username:token' 'https://api.dev.name.com/v4/domains/example.org/records/12345' -X DELETE
{}