> For the complete documentation index, see [llms.txt](https://docs.discloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.discloud.com/en/api-and-integrations/api-overview/custom-domain.md).

# Custom Domain

## Verify custom domain DNS

> Checks the DNS status of a custom domain in real time.

```json
{"openapi":"3.0.4","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Custom Domains","description":"Operations about custom domains"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/customdomain/{domainName}/verify":{"get":{"tags":["Custom Domains"],"summary":"Verify custom domain DNS","description":"Checks the DNS status of a custom domain in real time.","operationId":"verifyCustomDomain","parameters":[{"name":"domainName","in":"path","required":true,"description":"Custom domain to verify","schema":{"type":"string"}}],"responses":{"200":{"description":"DNS status returned successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"domain":{"$ref":"#/components/schemas/CustomDomain"}}}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"No permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Domain not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"External API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Remove custom domain

> Removes a custom domain from the user and unlinks it from the app.

```json
{"openapi":"3.0.4","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Custom Domains","description":"Operations about custom domains"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/customdomain/{domainName}/remove":{"delete":{"tags":["Custom Domains"],"summary":"Remove custom domain","description":"Removes a custom domain from the user and unlinks it from the app.","operationId":"removeCustomDomain","parameters":[{"name":"domainName","in":"path","required":true,"description":"Custom domain to remove","schema":{"type":"string"}}],"responses":{"200":{"description":"Custom domain removed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"domain":{"type":"string"}}}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"No permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Domain not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"External API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Edit custom domain link

> Moves a custom domain to another app.

```json
{"openapi":"3.0.4","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Custom Domains","description":"Operations about custom domains"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/customdomain/{domainName}/edit":{"put":{"tags":["Custom Domains"],"summary":"Edit custom domain link","description":"Moves a custom domain to another app.","operationId":"editCustomDomain","parameters":[{"name":"domainName","in":"path","required":true,"description":"Custom domain to move","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["newAppID"],"properties":{"newAppID":{"type":"string","description":"New app ID"}}}}}},"responses":{"200":{"description":"Custom domain edited successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"migrated":{"type":"boolean"},"domain":{"type":"string"}}}}}},"400":{"description":"Invalid operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"No permission","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Domain or app not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"App already has another custom domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Migration error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## List custom domains

> Returns all custom domains of the authenticated user.

```json
{"openapi":"3.0.4","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Custom Domains","description":"Operations about custom domains"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/customdomain/all":{"get":{"tags":["Custom Domains"],"summary":"List custom domains","description":"Returns all custom domains of the authenticated user.","operationId":"listCustomDomains","responses":{"200":{"description":"List of custom domains returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainListResponse"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Create custom domain

> Creates a new custom domain and links it to an app.

```json
{"openapi":"3.0.4","info":{"title":"Discloud API","version":"2.0.0"},"tags":[{"name":"Custom Domains","description":"Operations about custom domains"}],"servers":[{"url":"https://api.discloud.app/v2","description":"API Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"api-token"}},"schemas":{"Error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"paths":{"/customdomain/create":{"post":{"tags":["Custom Domains"],"summary":"Create custom domain","description":"Creates a new custom domain and links it to an app.","operationId":"createCustomDomain","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domainName","appID"],"properties":{"domainName":{"type":"string","description":"Desired custom domain name"},"appID":{"type":"string","description":"App ID to link"}}}}}},"responses":{"200":{"description":"Custom domain created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainResponse"}}}},"400":{"description":"Invalid domain format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Plan limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"App not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Domain already registered or app already has a custom domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"External API error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.discloud.com/en/api-and-integrations/api-overview/custom-domain.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
