GET/api/v1/projects/{project_id}/domains/{domain_id}/records
get_required_dns_records
Lists the DNS records a sending domain needs, for entry by hand at any registrar.
- Call it
- to show a person what to create in DNS, or to check what a domain needs after the node’s pools changed.
- Needs
- an admin key with
project_id, or a project key with scoperead(its own project; the argument is ignored), and the domain’s id. - Returns
required_records: each withpurpose,type,name,content,priorityandcreate_only_if_absent(DMARC: keep an existing policy). The same asGET /api/v1/projects/{project_id}/domains/{domain_id}/records.
Arguments
- object
-
domain_idstring · uuidrequiredThe domain’s id, as
add_sending_domainorlist_sending_domainsgave it. -
project_idstring · uuid | nullThe domain’s project. An admin key must pass it; a project key’s own project is used and this is ignored.
No other arguments are accepted.
Result
The result comes back as structuredContent, with the same JSON as a text block.
- object · all fields required
-
required_recordsarray of RequiredRecordWhat to create in DNS, in this order.
6 fields
- RequiredRecord object · all fields required
-
contentstringThe whole value.
-
create_only_if_absentbooleanCreate it only if the name has no record of this type, and never change one that is there (the DMARC record).
-
namestringThe owner name, without a trailing dot.
-
priorityinteger · uint16 | nullThe MX priority;
nullfor other types.0–65535
-
purposeRecordPurposeOutputWhat a required record is for.
spf_bounceSPF of the bounce subdomain.mx_bounceMX of the bounce subdomain.dkimThe DKIM public key.dmarcThe DMARC policy.tracking_cnameThe tracking host’s CNAME. -
typeRecordTypeOutputThe type of a DNS record.
- txt
- mx
- cname
Definitions
RecordPurposeOutput
What a required record is for.
string · enum
spf_bounce SPF of the bounce subdomain.
mx_bounce MX of the bounce subdomain.
dkim The DKIM public key.
dmarc The DMARC policy.
tracking_cname The tracking host’s CNAME.
RecordTypeOutput
The type of a DNS record.
string · enum
- txt
- mx
- cname
RequiredRecord
A DNS record a sending domain needs.
- object · all fields required
-
contentstringThe whole value.
-
create_only_if_absentbooleanCreate it only if the name has no record of this type, and never change one that is there (the DMARC record).
-
namestringThe owner name, without a trailing dot.
-
priorityinteger · uint16 | nullThe MX priority;
nullfor other types.0–65535
-
purposeRecordPurposeOutputWhat a required record is for.
spf_bounceSPF of the bounce subdomain.mx_bounceMX of the bounce subdomain.dkimThe DKIM public key.dmarcThe DMARC policy.tracking_cnameThe tracking host’s CNAME. -
typeRecordTypeOutputThe type of a DNS record.
- txt
- mx
- cname
Errors
A failed call answers isError: true with a code from the same table as the HTTP API, and detail. How tools report errors
HTTP API
The same operation over HTTP: GET /api/v1/projects/{project_id}/domains/{domain_id}/records