Mail API reference

Mail API · Domains

get/v1/workspaces/{workspace_id}/domains/{domain_id}/dns-records/exportAuth

Download the domain's DNS records as a BIND zone fragment or a CSV.

`format=bind`: a zone-file fragment (`$ORIGIN <zone>.`, `$TTL 3600`, names relative to the zone, MX with priority, TXT split into ≤255-byte quoted strings, a comment per record with its purpose, required/recommended and any conflict) that Cloudflare and Route 53 import directly. `format=csv`: `type,name,value,priority,ttl,purpose,required` (the common DNS-import columns plus two), RFC 4180 quoting, fully qualified names. By default only records not yet verified; `all=true` for every record. Served as an attachment.

Path parameters

workspace_id*string · uuid

Id of the workspace.

domain_id*string · uuid

Id of the domain.

Query parameters

format*enum (2)

File format: `bind` (a zone-file fragment, `text/dns`) or `csv`.

zonestring · hostname

BIND: the `$ORIGIN` names are relative to (the domain or one of its parents). Defaults to the detected zone, else the domain itself.

allboolean

Include records that already verify.

Response · 200

The file.

Example

Request

GET https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/domains/{domain_id}/dns-records/export
Authorization: Bearer YOUR_TOKEN