Set Stack Network Mode
curl --request POST \
--url https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"network_mode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({network_mode: '<string>'})
};
fetch('https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode"
payload = { "network_mode": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode"
payload := strings.NewReader("{\n \"network_mode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}Stacks
Set Stack Network Mode
Sets how the members of a stack reach each other. The accepted mode is public.
POST
/
v1
/
stacks
/
{stack_id}
/
network-mode
Set Stack Network Mode
curl --request POST \
--url https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"network_mode": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({network_mode: '<string>'})
};
fetch('https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode"
payload = { "network_mode": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/stacks/{stack_id}/network-mode"
payload := strings.NewReader("{\n \"network_mode\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}Only
public is accepted: the members use the public addresses of the services, and databases are reached with client certificates. Any other value fails with STACK_NETWORK_MODE_UNAVAILABLE. Needs the stacks:write scope when called with an API key.
string
required
The stack ID.
string
The workspace the stack belongs to, when you act on it as the workspace owner.
string
required
public.Response
The stack, as in Get Stack.Errors
| Status | Code | When |
|---|---|---|
| 400 | STACK_NETWORK_MODE_UNAVAILABLE | The mode is not public. |
| 403 | WORKSPACE_OWNER_ONLY | You are a workspace member, not the owner. |
| 404 | STACK_NOT_FOUND | The stack does not exist or belongs to another account. |
Last modified on October 28, 2026