Workspace
Transfer ownership
Makes an active member the new OWNER of the workspace. The target is matched by e-mail, case-insensitively, and must have accepted the invite: a PENDING invitation does not qualify (400 TARGET_NOT_ACTIVE).
Side effects:
- The previous owner becomes ADMIN (
yourNewRole). - The OAuth refresh tokens of both users are revoked: an MCP connection keeps working until its access token expires, then must consent again.
- Responsibility for the bill moves to the new owner.
OWNER on the wire only. Only a user credential reaches this route — an OAuth/MCP token, or an account key (ps_account_) — and only when that user is the workspace OWNER. Any workspace or number ps_ key gets 403 MACHINE_CREDENTIAL_CANNOT_MANAGE_WORKSPACE; ADMIN and below get 403 PERMISSION_DENIED.
Every response of this endpoint is sent with Cache-Control: no-store.
POST
/
v1
/
workspace
/
transfer-ownership
Transfer ownership
curl --request POST \
--url https://pilotstatus.com.br/v1/workspace/transfer-ownership \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"email": "new-owner@acme.com"
}
'import requests
url = "https://pilotstatus.com.br/v1/workspace/transfer-ownership"
payload = { "email": "new-owner@acme.com" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'new-owner@acme.com'})
};
fetch('https://pilotstatus.com.br/v1/workspace/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://pilotstatus.com.br/v1/workspace/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([
'email' => 'new-owner@acme.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://pilotstatus.com.br/v1/workspace/transfer-ownership"
payload := strings.NewReader("{\n \"email\": \"new-owner@acme.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://pilotstatus.com.br/v1/workspace/transfer-ownership")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"new-owner@acme.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/workspace/transfer-ownership")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"new-owner@acme.com\"\n}"
response = http.request(request)
puts response.read_body{
"transferred": true,
"newOwnerId": "usr_9f8e",
"yourNewRole": "ADMIN"
}Body
application/json
Was this page helpful?
⌘I
Transfer ownership
curl --request POST \
--url https://pilotstatus.com.br/v1/workspace/transfer-ownership \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"email": "new-owner@acme.com"
}
'import requests
url = "https://pilotstatus.com.br/v1/workspace/transfer-ownership"
payload = { "email": "new-owner@acme.com" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'new-owner@acme.com'})
};
fetch('https://pilotstatus.com.br/v1/workspace/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://pilotstatus.com.br/v1/workspace/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([
'email' => 'new-owner@acme.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://pilotstatus.com.br/v1/workspace/transfer-ownership"
payload := strings.NewReader("{\n \"email\": \"new-owner@acme.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://pilotstatus.com.br/v1/workspace/transfer-ownership")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"new-owner@acme.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/workspace/transfer-ownership")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"new-owner@acme.com\"\n}"
response = http.request(request)
puts response.read_body{
"transferred": true,
"newOwnerId": "usr_9f8e",
"yourNewRole": "ADMIN"
}