Client Reference
DNS
DNS endpoint reference.
Scan
Scan DNS Records.
Scan for common DNS records on your domain and automatically add them to your zone. Useful if you haven't updated your nameservers yet.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. |
php
$response = $client->dns()->scan('ZONE_ID');
List
List, search, sort, and filter a zones' DNS records.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
params | array | No | [] | Query Parameters |
php
$response = $client->dns()->list('ZONE_ID', []);
Create
Create a new DNS record for a zone.
Notes:
- A/AAAA records cannot exist on the same name as CNAME records.
- NS records cannot exist on the same name as any other record type.
- Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
values | array | Yes | Values to set on DNS. |
php
$response = $client->dns()->create('ZONE_ID', []);
Export
Export BIND config.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. |
php
$response = $client->dns()->export('ZONE_ID');
Import
Import BIND config.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
content | string | Yes | Content of BIND config to import. | |
proxied | bool | No | true | Should DNS records be proxied. |
php
$response = $client->dns()->import('ZONE_ID', 'CONTENT', true);
Get
DNS Record Details
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
dnsRecordId | string | Yes | DNS ID to fetch details. |
php
$response = $client->dns()->get('ZONE_ID', 'DNS_RECORD_ID');
Edit
Apply changes to an existing DNS record, overwriting only the supplied properties.
Notes:
- A/AAAA records cannot exist on the same name as CNAME records.
- NS records cannot exist on the same name as any other record type.
- Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
dnsRecordId | string | Yes | DNS ID to update. | |
values | array | Yes |
php
$response = $client->dns()->edit('ZONE_ID', 'DNS_RECORD_ID', []);
Update
Update an existing DNS record, overwriting the full configuration.
Notes:
- A/AAAA records cannot exist on the same name as CNAME records.
- NS records cannot exist on the same name as any other record type.
- Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
dnsRecordId | string | Yes | DNS ID to overwrite. | |
values | array | Yes |
php
$response = $client->dns()->update('ZONE_ID', 'DNS_RECORD_ID', []);
Delete
Delete DNS Record
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
zoneId | string | Yes | Zone Identifier. | |
dnsRecordId | string | Yes | DNS ID to delete. |
php
$response = $client->dns()->delete('ZONE_ID', 'DNS_RECORD_ID');

