API reference / Email
Connect an email domain
Connects the workspace's own domain for its teammates' addresses. The answer has the DNS records to add. When the DKIM records and the MX record check out, each teammate moves to handle@domain, and its old address still takes mail. Use a domain or a subdomain that gets no other mail, like agents.acme.com: Troopy refuses a domain whose MX points elsewhere. One domain a workspace. Owners and admins only.
/api/v1/email/domainOther ways to call it
troopy email-domain connecttroopy_connect_email_domainIdempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.Body
application/jsondomain*stringLike agents.acme.com
At least 4 characters · At most 253 characters
Response
200 · application/jsondata*object10 properties
domain*stringLike agents.acme.com
status*enum<string>pending waits for its DNS records. verified: teammates send and get mail on it. failed: error says why
pendingverifiedfailed
error*string | nullWhy it failed, or what still waits
records*array<object>The records to add at the DNS host of the domain
7 properties
type*enum<string>CNAMEMXTXT
name*stringThe full name of the record
value*stringpriority*integer | nullFor an MX record
purpose*enum<string>dkiminboundmail_fromdmarc
ok*booleanWhat the latest check found
optional*booleanIt helps mail land, but the domain verifies without it
zone*string | nullThe DNS zone that holds the records. A DNS host asks for the name of a record without it
dnsHost*string | nullWho serves the zone, like Namecheap, when Troopy knows its name servers
zoneMail*array<object>The MX records of the zone when the domain is a subdomain: the business's own mail. Keep them
2 properties
priority*integerhost*stringcheckedAt*string | nullverifiedAt*string | nullcreatedAt*stringISO 8601 date and time