Change Application Subdomain
curl --request PATCH \
--url https://api.vertracloud.app/v1/apps/{id}/network/subdomain \
--header 'Content-Type: application/json' \
--data '
{
"subdomain": "<string>"
}
'import requests
url = "https://api.vertracloud.app/v1/apps/{id}/network/subdomain"
payload = { "subdomain": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({subdomain: '<string>'})
};
fetch('https://api.vertracloud.app/v1/apps/{id}/network/subdomain', 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}/network/subdomain",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'subdomain' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/apps/{id}/network/subdomain"
payload := strings.NewReader("{\n \"subdomain\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.vertracloud.app/v1/apps/{id}/network/subdomain")
.header("Content-Type", "application/json")
.body("{\n \"subdomain\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/network/subdomain")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"subdomain\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": {
"subdomain": "myapp.vertraweb.app"
}
}
Network
Change Application Subdomain
Renames the vertraweb.app subdomain of an application that is already published on the web.
PATCH
/
v1
/
apps
/
{id}
/
network
/
subdomain
Change Application Subdomain
curl --request PATCH \
--url https://api.vertracloud.app/v1/apps/{id}/network/subdomain \
--header 'Content-Type: application/json' \
--data '
{
"subdomain": "<string>"
}
'import requests
url = "https://api.vertracloud.app/v1/apps/{id}/network/subdomain"
payload = { "subdomain": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({subdomain: '<string>'})
};
fetch('https://api.vertracloud.app/v1/apps/{id}/network/subdomain', 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}/network/subdomain",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'subdomain' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/apps/{id}/network/subdomain"
payload := strings.NewReader("{\n \"subdomain\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.vertracloud.app/v1/apps/{id}/network/subdomain")
.header("Content-Type", "application/json")
.body("{\n \"subdomain\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/network/subdomain")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"subdomain\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": {
"subdomain": "myapp.vertraweb.app"
}
}
string
required
The application ID.
string
If the application belongs to a workspace, the workspace’s ID. Required for workspace members acting on an application they don’t own.
string
required
The new subdomain, without the
.vertraweb.app suffix (e.g., myapp). Between 3 and 50
characters, matching ^[a-z0-9][a-z0-9-]*[a-z0-9]$ — lowercase letters, digits and hyphens, never
starting or ending with a hyphen.Response
object
Show Toggle object
Show Toggle object
string
The full subdomain now serving the application, including the suffix.
{
"response": {
"subdomain": "myapp.vertraweb.app"
}
}
This route only renames an existing subdomain. An application that was created without web
publishing answers
APP_HAS_NO_SUBDOMAIN — turn publishing on first with
Publish Application on the Web.The previous subdomain is released the moment the change goes through. It is not reserved for you,
and anyone can take it afterwards.
Error Responses
string
The error code indicating the reason for the failure. Possible values:
VALIDATION_ERROR: The path parameter or the body 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).PLAN_DOES_NOT_SUPPORT_CUSTOM_SUBDOMAIN: The owner’s plan does not allow choosing the subdomain name (403).APP_NOT_FOUND: The specified application does not exist (404).APP_HAS_NO_SUBDOMAIN: The application is not published on the web, so there is nothing to rename (400).INVALID_SUBDOMAIN_FORMAT: The value is not a valid subdomain after normalisation (400).SUBDOMAIN_FORBIDDEN: The requested subdomain is on the platform’s reserved list (400).SUBDOMAIN_TAKEN: Another application already uses that subdomain (409).SUBDOMAIN_CHANGE_RATE_LIMITED: The subdomain of this application was changed less than 5 minutes ago (429).INTERNAL_SERVER_ERROR: Unexpected failure (500).
string
A descriptive message providing additional details about the error.
{
"code": "APP_HAS_NO_SUBDOMAIN"
}
{
"code": "SUBDOMAIN_TAKEN"
}
{
"code": "SUBDOMAIN_CHANGE_RATE_LIMITED"
}
This route has its own budget of 5 requests per minute, on top of the 5-minute cooldown between
changes to an application’s public address. That cooldown is shared with
Publish: publishing an application also starts
it, and unpublishing then republishing under a new name does not get around it. See
Rate Limiting.