> 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"}}}}}}}}}
```
