## Email Routing - DNS settings `client.emailRouting.dns.get(DNSGetParamsparams, RequestOptionsoptions?): DNSGetResponse` **get** `/zones/{zone_id}/email/routing/dns` Show the DNS records needed to configure your Email Routing zone. ### Parameters - `params: DNSGetParams` - `zone_id: string` Path param: Identifier. - `subdomain?: string` Query param: Domain of your zone. ### Returns - `DNSGetResponse = EmailEmailRoutingDNSQueryResponse | EmailDNSSettingsResponseCollection` - `EmailEmailRoutingDNSQueryResponse` - `errors: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `messages: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `success: true` Whether the API call was successful. - `true` - `result?: Result` - `errors?: Array` - `code?: string` - `missing?: DNSRecord` List of records needed to enable an Email Routing zone. - `content?: string` DNS record content. - `name?: string` DNS record name (or @ for the zone apex). - `priority?: number` Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred. - `ttl?: number | 1` Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'. - `number` - `1` - `1` - `type?: "A" | "AAAA" | "CNAME" | 15 more` DNS record type. - `"A"` - `"AAAA"` - `"CNAME"` - `"HTTPS"` - `"TXT"` - `"SRV"` - `"LOC"` - `"MX"` - `"NS"` - `"CERT"` - `"DNSKEY"` - `"DS"` - `"NAPTR"` - `"SMIMEA"` - `"SSHFP"` - `"SVCB"` - `"TLSA"` - `"URI"` - `record?: Array` - `content?: string` DNS record content. - `name?: string` DNS record name (or @ for the zone apex). - `priority?: number` Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred. - `ttl?: number | 1` Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'. - `type?: "A" | "AAAA" | "CNAME" | 15 more` DNS record type. - `result_info?: ResultInfo` - `count?: number` Total number of results for the requested service. - `page?: number` Current page within paginated list of results. - `per_page?: number` Number of results per page of results. - `total_count?: number` Total results available without any search parameters. - `total_pages?: number` The number of total pages in the entire result set. - `EmailDNSSettingsResponseCollection` - `errors: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `messages: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `success: true` Whether the API call was successful. - `true` - `result?: Array` - `content?: string` DNS record content. - `name?: string` DNS record name (or @ for the zone apex). - `priority?: number` Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred. - `ttl?: number | 1` Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'. - `type?: "A" | "AAAA" | "CNAME" | 15 more` DNS record type. - `result_info?: ResultInfo` - `count?: number` Total number of results for the requested service. - `page?: number` Current page within paginated list of results. - `per_page?: number` Number of results per page of results. - `total_count?: number` Total results available without any search parameters. - `total_pages?: number` The number of total pages in the entire result set. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const dns = await client.emailRouting.dns.get({ zone_id: '023e105f4ecef8ad9ca31a8372d0c353' }); console.log(dns); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "errors": [ { "code": "code", "missing": { "content": "route1.mx.cloudflare.net", "name": "example.com", "priority": 12, "ttl": 1, "type": "NS" } } ], "record": [ { "content": "route1.mx.cloudflare.net", "name": "example.com", "priority": 12, "ttl": 1, "type": "NS" } ] }, "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000, "total_pages": 100 } } ```