---
title: "Get Setup Link"
method: GET
path: "/v0/domains/{domain_id}/setup-link"
tags: ["domains"]
---

# Get Setup Link

`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

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.

## Path parameters

- `domain_id` string, required: The ID of the domain.

## Response `200`

Response with status 200

- DomainsGetSetupLinkResponse
  - `supported` boolean, 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_name` string: Display name of the domain's DNS provider, for the setup button label.
  - `url` string: 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.
  - `width` integer: Suggested popup width from the provider, in pixels.
  - `height` integer: Suggested popup height from the provider, in pixels.
  - `state` string: 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_provider` string: 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.

## Other responses

- `404`: Error response with status 404
- `409`: Error response with status 409
- `422`: Error response with status 422

## Changes

- **2026-10-16** `3f5c7830c952`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentmail-to/apis/api/changes/v0/domains/:domain_id/setup-link/get.md)

---

[API](https://skmtc.dev/agentmail-to/apis/api.md) - [All operations](https://skmtc.dev/agentmail-to/apis/api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentmail-to/apis/api/revisions/a9792efe7bdf?raw)
