Remove Application Domain
curl --request DELETE \
--url https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}import requests
url = "https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"response": null
}
Domains
Remove Application Domain
Removes a custom domain from an application, together with its automatic www companion.
DELETE
/
v1
/
apps
/
{id}
/
domains
/
{domain_id}
Remove Application Domain
curl --request DELETE \
--url https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}import requests
url = "https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}"
response = requests.delete(url)
print(response.text)const options = {method: 'DELETE'};
fetch('https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body{
"response": null
}
Removes the domain and, when it has one, its automatic
www (or root) companion. The domain stops resolving to the
application right away and can be added to another application. The application is not restarted. Domains that
redirected to the removed one start serving the application instead. Requires the apps:write scope when called with
an API key.
string
required
The application ID.
string
required
The ID of the domain to remove, from List Application Domains.
string
If the application belongs to a workspace, the workspace’s ID. Required for workspace members acting on an application they don’t own.
Response
A success returns200 with { "response": null }.
{
"response": null
}
Removing a domain does not change your DNS. Delete the
CNAME and the validation TXT records of the domain, and
of its companion, at your DNS provider. If they stay, the name keeps pointing at Vertra Cloud and another customer
could claim it. The same applies when the domain disappears because the application was unpublished or because the
14-day cleanup removed it.Removing the companion of a domain removes only the companion. To drop both, remove the main domain.
Unpublishing the application removes every domain at once.
Error Responses
string
The error code indicating the reason for the failure. Possible values:
VALIDATION_ERROR: The path parameters failed validation (400). The response also carriesmessageandpath.UNAUTHORIZED: The request is not authenticated (401).USER_NOT_FOUND: The authenticated user could not be resolved (401).ACCESS_DENIED: The user does not have permission to act on the application (403).API_KEY_SCOPE_DENIED: The API key does not have theapps:writescope (403).APP_NOT_FOUND: The specified application does not exist (404).DOMAIN_NOT_FOUND: The application has no domain with that ID (404).RATE_LIMIT_EXCEEDED: The route’s budget was reached (429).INTERNAL_SERVER_ERROR: Unexpected failure (500).
{
"code": "DOMAIN_NOT_FOUND"
}
This route has its own budget of 10 requests per minute. See Rate Limiting.