Transfer Ownership
curl --request POST \
--url https://api.vertracloud.app/v1/workspaces/{id}/transfer-ownership \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "<string>"
}
'import requests
url = "https://api.vertracloud.app/v1/workspaces/{id}/transfer-ownership"
payload = { "user_id": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({user_id: '<string>'})
};
fetch('https://api.vertracloud.app/v1/workspaces/{id}/transfer-ownership', 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/workspaces/{id}/transfer-ownership",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user_id' => '<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/workspaces/{id}/transfer-ownership"
payload := strings.NewReader("{\n \"user_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.vertracloud.app/v1/workspaces/{id}/transfer-ownership")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/workspaces/{id}/transfer-ownership")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyWorkspaces
Transfer Ownership
Transfers workspace ownership to another member. Owner only, dashboard session only.
POST
/
v1
/
workspaces
/
{id}
/
transfer-ownership
Transfer Ownership
curl --request POST \
--url https://api.vertracloud.app/v1/workspaces/{id}/transfer-ownership \
--header 'Content-Type: application/json' \
--data '
{
"user_id": "<string>"
}
'import requests
url = "https://api.vertracloud.app/v1/workspaces/{id}/transfer-ownership"
payload = { "user_id": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({user_id: '<string>'})
};
fetch('https://api.vertracloud.app/v1/workspaces/{id}/transfer-ownership', 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/workspaces/{id}/transfer-ownership",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user_id' => '<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/workspaces/{id}/transfer-ownership"
payload := strings.NewReader("{\n \"user_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.vertracloud.app/v1/workspaces/{id}/transfer-ownership")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/workspaces/{id}/transfer-ownership")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyDashboard session only — outside the API key scope catalog, so an API key gets
403 API_KEY_SCOPE_DENIED. A key that could transfer
ownership could be used to take over the workspace.owner_id grants the full permission catalog without a row
in workspace_member. Transferring it removes the new owner’s member row and creates one for
the previous owner — seeded with the Admin role if it still exists, otherwise the first role by
display position.
Path
string
required
Workspace ID.
Body
string
required
Must already be a member of the workspace.
Response
Same shape as Get Workspace, with the newowner_id.
Errors
| Status | Code | When |
|---|---|---|
| 403 | API_KEY_SCOPE_DENIED | Called with an API key. |
| 403 | WORKSPACE_OWNER_ONLY | Caller isn’t the current owner. |
| 404 | WORKSPACE_NOT_FOUND | Workspace doesn’t exist or is soft-deleted. |