/v1/workspaces/{workspace_id}/domains/lookupAuthLook up a domain before adding it: zone, DNS provider, Domain Connect support, a better subdomain, existing records.
Creates nothing. Resolves only names at or under `fqdn` and its zone apex, plus the Domain Connect endpoints the zone advertises (fetched through the SSRF guard; cached per zone for an hour). Limited to 30 lookups per workspace per minute.
Path parameters
workspace_id*string · uuidId of the workspace.
Query parameters
fqdn*string · hostnameDomain to look up (not created).
Response · 200
fqdn*stringThe domain that was looked up.
Example: "acme.com"
zone*stringZone apex found by walking SOA records; null when the domain does not resolve.
Example: "acme.com"
provider*objectid*objectProvider id, matching the console's provider guides.
name*stringDisplay name of the DNS provider.
Example: "Cloudflare"
source*objectHow it was identified: NS host names, or the Domain Connect settings the zone advertises.
nameservers*arrayThe zone's nameservers that identified the provider.
Example: ["ns1.digitalocean.com","ns2.digitalocean.com"]
domain_connect*objectavailable*booleanOur Domain Connect template is onboarded at this provider: one-click setup is possible.
supported*booleanThe zone's DNS provider runs Domain Connect at all.
provider_id*stringDomain Connect provider id; null when the zone does not advertise one.
Example: "cloudflare.com"
provider_name*stringDomain Connect provider name; null when unknown.
Example: "Cloudflare"
reason*objectWhy `available` is false: the zone advertises no Domain Connect (`no_record`), its settings could not be read (`settings_unreachable`), the provider has not onboarded our template (`template_not_onboarded`), DNS did not answer (`lookup_failed`), or the provider is ready but ProductCraft has not switched Domain Connect on yet (`disabled`).
suggestion*objectA better name to send from when an apex was typed: `mail.<apex>`, or `send.<apex>` when `mail.` already has other records.
existing*objectRecords already there that will matter.
Example
Request
GET https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/domains/lookup
Authorization: Bearer YOUR_TOKENResponse
{
"fqdn": "acme.com",
"zone": "acme.com",
"provider": {
"id": {},
"name": "Cloudflare",
"source": {},
"nameservers": [
"ns1.digitalocean.com",
"ns2.digitalocean.com"
]
},
"domain_connect": {
"available": false,
"supported": false,
"provider_id": "cloudflare.com",
"provider_name": "Cloudflare",
"reason": {}
},
"suggestion": {},
"existing": {}
}