---
title: "Link custom domain"
method: POST
path: "/api/apps/{app_id}/custom-domains/{domain_id}/link"
---

# Link custom domain

`POST /api/apps/{app_id}/custom-domains/{domain_id}/link`

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Attaches the domain to Base44's hosting and starts DNS verification.

Call this after adding a domain. It's also how you put a domain back into service after [Unlink custom domain](/api-reference/unlink-custom-domain). Linking re-enables any email domain configured on it.

The response body is `null`, so read the domain back with [Get custom domain](/api-reference/get-custom-domain). Verification doesn't finish here. Linking only asks the provider to start checking DNS, so poll [Get custom domain status](/api-reference/get-custom-domain-status) until `verificationStatus` is `verified`.

DNS propagation happens outside Base44, so a linked domain can sit unverified for as long as its nameservers take.

## Path parameters

- `app_id` string, required — ID of the app the domain belongs to.
- `domain_id` string, required — ID of the custom domain. Get this from [List custom domains](/api-reference/list-custom-domains).

## Response `200`

The domain is attached and verification has started. The body is `null`.

- unknown

## Other responses

- `401` — Missing or invalid credentials.
- `403` — You don't have access to this app, or you used a workspace API key. These endpoints take a personal API key.
- `404` — The app has no custom domain with this ID, or the app doesn't exist.
- `429` — Base44's hosting provider is rate limiting. Retry later.

---

[API](https://skmtc.dev/base44/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/base44/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/base44/base44-app-management-api/revisions/173e4e9c63c2/schema)
