# get_domain_connect_url

Source: https://modulify.ai/docs/api/domains/get-domain-connect-url

Returns a link that has the DNS provider add the records one custom domain needs automatically, where the provider supports it.

- Title: Get a one-click DNS link
- Scope: `config:read`
- Access: Read only
- Endpoint: `POST /v1/get_domain_connect_url`

The link covers that domain and its www companion, never the site's other domains, so each domain needs its own link. The tool tells the client to hand you the link rather than follow it itself.

The link comes back in `applyUrl`. It only adds the address records, never the TXT record that proves the domain is yours. While the domain's `Verified` is false, the answer also carries `ownershipRecord` with that TXT record's `type`, `name` and `value`, and the message reads `One-click DNS configuration is ready. It adds the address records only, so the TXT record that proves you own example.com still has to be added at your DNS host by hand.` The tool tells the client to give you that record along with the link, because the domain never serves the site without it. When the provider does not support one-click setup, the answer carries `supported` false and no link, and the records have to be added by hand. A domain the workspace bought that uses Modulify's nameservers also answers `supported` false, with `Modulify adds the DNS records to example.com for you, so one-click setup is not needed.`, because Modulify adds its records by itself. While the site's custom domains are paused because the workspace left its paid plan, it is refused with `Custom domains are paused until the workspace is on a paid plan again!` It needs the **Manage domains** permission in the workspace. See [One click setup](https://modulify.ai/docs/publish/dns-records#one-click-setup).

## Request

Call it with a `POST` to `https://api.modulify.ai/v1/get_domain_connect_url`, sending the inputs below as a JSON object. The token needs the `config:read` scope.

It only reads and changes nothing, so retrying it is safe.

```bash
curl -X POST https://api.modulify.ai/v1/get_domain_connect_url \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"projectId":"PROJECT_ID","workspaceId":"WORKSPACE_ID","domainId":"DOMAIN_ID"}'
```

Over MCP, the same method is the [get_domain_connect_url tool](https://modulify.ai/docs/mcp/domains/get-domain-connect-url).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `workspaceId` | string | Yes | The workspace the site belongs to. |
| `domainId` | string | Yes | The `_id` of the custom domain to configure, as `get_domain_status` or `add_custom_domain` returned it. |

## Response

Every call answers with the [JSON envelope](https://modulify.ai/docs/api/requests-and-responses#the-response) of `success`, `message`, `data`, `code` and `version`. `data` holds the result described above, and on a method that returns a total, `count` carries it. The [response headers](https://modulify.ai/docs/api/requests-and-responses#headers-on-every-method-call) carry the call's `X-Request-Id` and what is left of your per-minute budget in `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`. [Errors](https://modulify.ai/docs/api/errors) explains every status code a call can answer with.