Skip to main content

records

GoDaddy Domains v1 API. Accepts a Personal Access Token (Bearer) or a classic sso-key credential.

Overview

Namerecords
TypeResource
Idgodaddy.dns.records

Fields

The following fields are returned by SELECT queries:

Request was successful

NameDatatypeDescription
namestring (domain)
datastring
portintegerService port (SRV only)
priorityinteger (integer-positive)Record priority (MX and SRV only)
protocolstringService protocol (SRV only)
servicestringService type (SRV only)
ttlinteger (integer-positive)
typestring (A, AAAA, CAA, CNAME, MX, NS, SOA, SRV, TXT)
weightinteger (integer-positive)Record weight (SRV only)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectdomain, type, namex_shopper_id, offset, limitReturns DNS records for the domain. Optionally filter by record type and name. Returns an array of DNSRecord objects.
deletedeletedomain, type, namex_shopper_idDeletes all DNS records matching the specified type and name. All other records are preserved. Returns 204 No Content.
addexecdomain, recordsx_shopper_idAppends DNS records to the domain's zone without removing existing records. Existing records with the same type and name are preserved. Returns 204 No Content.
replace_allexecdomain, recordsx_shopper_idReplaces the entire DNS record set for the domain. All existing records are removed and replaced with the submitted set. Returns 204 No Content.
replace_by_type_nameexecdomain, type, name, recordsx_shopper_idReplaces all DNS records of the specified type and name. All other records are preserved. Returns 204 No Content.
replace_by_typeexecdomain, type, recordsx_shopper_idReplaces all DNS records of the specified type across all names. Records of other types are preserved. Returns 204 No Content.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
domainstringDomain whose DNS Records are to be replaced
namestringDNS Record Name for which DNS Records are to be replaced
typestringDNS Record Type for which DNS Records are to be replaced
x_shopper_idstringShopper ID which owns the domain. NOTE: This is only required if you are a Reseller managing a domain purchased outside the scope of your reseller account.
limitintegerMaximum number of items to return
offsetintegerNumber of results to skip for pagination
x_shopper_idstringShopper ID which owns the domain. NOTE: This is only required if you are a Reseller managing a domain purchased outside the scope of your reseller account. (wire: X-Shopper-Id)

SELECT examples

Returns DNS records for the domain. Optionally filter by record type and name. Returns an array of DNSRecord objects.

SELECT
name,
data,
port,
priority,
protocol,
service,
ttl,
type,
weight
FROM godaddy.dns.records
WHERE domain = '{{ domain }}' -- required
AND type = '{{ type }}' -- required
AND name = '{{ name }}' -- required
AND x_shopper_id = '{{ x_shopper_id }}'
AND offset = '{{ offset }}'
AND limit = '{{ limit }}'
;

DELETE examples

Deletes all DNS records matching the specified type and name. All other records are preserved. Returns 204 No Content.

DELETE FROM godaddy.dns.records
WHERE domain = '{{ domain }}' --required
AND type = '{{ type }}' --required
AND name = '{{ name }}' --required
AND x_shopper_id = '{{ x_shopper_id }}'
;

Lifecycle Methods

EXEC variables use wire (API) names.

Appends DNS records to the domain's zone without removing existing records. Existing records with the same type and name are preserved. Returns 204 No Content.

EXEC godaddy.dns.records.add
@domain='{{ domain }}' --required,
@x_shopper_id='{{ x_shopper_id }}',
@records='{{ records }}'
;