domains

Build a one-click DNS setup link for the domain via the Domain Connect standard. When the domain's DNS provider supports Domain Connect and carries the AgentMail template, the response contains a signed URL: opening it lets the domain owner approve the required DNS records at their provider, which writes them automatically — no copy-paste. When the provider does not support it, supported is false and the domain's records should be added manually instead.

get/v0/domains/{domain_id}/setup-link

Request

  • Base URL
    https://api.agentmail.to
  • URL
    https://api.agentmail.to/v0/domains/{domain_id}/setup-link
  • Auth
    HTTP bearer

Path parameters

domain_idstring required

The ID of the domain.

Response

Response with status 200

supportedboolean required

Whether one-click setup is available for this domain. false means the domain's DNS provider does not support Domain Connect (or does not carry the AgentMail template yet) — add the domain's records manually instead.

provider_namestring

Display name of the domain's DNS provider, for the setup button label.

urlstring

The signed Domain Connect apply URL. Open it in a browser: the domain owner signs in at their DNS provider, reviews the records, and approves — the provider writes them.

widthinteger

Suggested popup width from the provider, in pixels.

heightinteger

Suggested popup height from the provider, in pixels.

statestring

Opaque value echoed back on the provider's redirect. Store it before opening the URL and compare on return to tie the redirect to this request.

conflicting_providerstring

Set when the domain currently has another email provider's MX records (for example Google Workspace). Applying the template would replace them — warn before proceeding.

Changes