Add Stack Member
curl --request POST \
--url https://api.vertracloud.app/v1/stacks/{stack_id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_type": "<string>",
"resource_id": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({resource_type: '<string>', resource_id: '<string>'})
};
fetch('https://api.vertracloud.app/v1/stacks/{stack_id}/members', 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}/members"
payload = {
"resource_type": "<string>",
"resource_id": "<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}/members"
payload := strings.NewReader("{\n \"resource_type\": \"<string>\",\n \"resource_id\": \"<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))
}Members
Add Stack Member
Puts an application or database you already have into a stack, with optional connections.
POST
/
v1
/
stacks
/
{stack_id}
/
members
Add Stack Member
curl --request POST \
--url https://api.vertracloud.app/v1/stacks/{stack_id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_type": "<string>",
"resource_id": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({resource_type: '<string>', resource_id: '<string>'})
};
fetch('https://api.vertracloud.app/v1/stacks/{stack_id}/members', 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}/members"
payload = {
"resource_type": "<string>",
"resource_id": "<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}/members"
payload := strings.NewReader("{\n \"resource_type\": \"<string>\",\n \"resource_id\": \"<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))
}Adds an application or a database to the stack. It must belong to the same account or workspace as the stack and not be in another stack. 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
application or database.string
required
The application or database ID.
object[]
Connections to create between the new member and the applications of the stack. May be empty. Each item has
app_id, exactly one of database_id or target_app_id, and an optional env_map (see Create Connection).Response
The updated stack withrestart_required and apps_to_restart, as in Create Stack. Restart the listed applications to make them read the new variables.
Errors
| Status | Code | When |
|---|---|---|
| 409 | STACK_MEMBER_CONFLICT | The resource is already in another stack, or is not in the same account or workspace. |
| 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. |
| 404 | APP_NOT_FOUND | The application does not exist or is not yours. |
| 404 | DATABASE_NOT_FOUND | The database does not exist or is not yours. |
Last modified on October 28, 2026