Skip to main content
Use this endpoint to associate a custom domain with your application. Once you submit the domain, Virtus Cloud will provision the necessary TLS certificate and return the DNS records you need to configure at your registrar. You can retrieve those records at any time using the DNS Settings endpoint.
A Standard plan or higher is required to attach a custom domain to your application.

Endpoint

POST https://api.virtuscloud.app/v2/apps/{app_id}/network/custom

Authorization

Include your API key in the request header:
Authorization: <api_key>

Path Parameters

app_id
string
required
The unique identifier of your application. You can find this in the URL of your application’s dashboard.

Body Parameters

custom
string
required
The custom domain you want to attach to your application. Use the apex domain (e.g. example.com) or a specific subdomain (e.g. app.example.com). Do not include https:// or a trailing slash.

Response

status
string
Indicates the outcome of the request. Returns "success" when the domain has been registered with the application successfully.

Examples

curl --request POST \
  --url "https://api.virtuscloud.app/v2/apps/{app_id}/network/custom" \
  --header "Authorization: <api_key>" \
  --header "Content-Type: application/json" \
  --data '{
    "custom": "example.com"
  }'

Response Example

{
  "status": "success"
}
After a successful response, use the DNS Settings endpoint to retrieve the CNAME and TXT records you need to add at your domain registrar. Your domain will not route to the application until those DNS records propagate and are validated.
This endpoint enforces a rate limit of one request every 60 seconds. Submitting the same domain multiple times within that window will be rejected.