Configure Domain Automatically
curl --request POST \
--url https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/connectimport requests
url = "https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/connect"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/connect', 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}/connect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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}/connect"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/connect")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/connect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"response": {
"url": "https://dns-provider.example/v2/domainTemplates/providers/..."
}
}
Domains
Configure Domain Automatically
Reserved for automatic DNS setup. Not available yet: the route currently always answers 404 DOMAIN_CONNECT_UNAVAILABLE.
POST
/
v1
/
apps
/
{id}
/
domains
/
{domain_id}
/
connect
Configure Domain Automatically
curl --request POST \
--url https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/connectimport requests
url = "https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/connect"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/connect', 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}/connect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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}/connect"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/connect")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/domains/{domain_id}/connect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"response": {
"url": "https://dns-provider.example/v2/domainTemplates/providers/..."
}
}
Not available yet. Automatic DNS setup has not been released, so today this route answers
404 DOMAIN_CONNECT_UNAVAILABLE on every call. Create the records yourself with
Domain DNS Records.apps:write scope when called with an
API key. The rest of this page describes the response shape, which no call returns today.
string
required
The application ID.
string
required
The domain ID, 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
APIApplicationDomainConnect
Show Toggle object
Show Toggle object
string
The link to open at the DNS provider to approve the records.
{
"response": {
"url": "https://dns-provider.example/v2/domainTemplates/providers/..."
}
}
The link is for you to open, not to call. After you approve it, the domain becomes
active once DNS propagates;
follow it with List Application Domains.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).DOMAIN_CONNECT_UNAVAILABLE: Automatic setup is not available yet, so every call answers this code (404). Use the manual records instead.RATE_LIMIT_EXCEEDED: The route’s budget was reached (429).INTERNAL_SERVER_ERROR: Unexpected failure (500).
{
"code": "DOMAIN_CONNECT_UNAVAILABLE"
}
This route has its own budget of 10 requests per minute. See Rate Limiting.