Transfer organization ownership
curl --request POST \
--url https://api.trycomp.ai/v1/organization/transfer-ownership \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"newOwnerId": "mem_xyz789"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({newOwnerId: 'mem_xyz789'})
};
fetch('https://api.trycomp.ai/v1/organization/transfer-ownership', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/organization/transfer-ownership"
payload = { "newOwnerId": "mem_xyz789" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Ownership transferred successfully",
"currentOwner": {
"memberId": "mem_abc123",
"previousRoles": [
"owner",
"employee"
],
"newRoles": [
"admin",
"employee"
]
},
"newOwner": {
"memberId": "mem_xyz789",
"previousRoles": [
"admin"
],
"newRoles": [
"admin",
"owner"
]
}
}Organization
Transfer organization ownership | Comp AI API
Transfers organization ownership to another member. The current owner will become an admin and keep all other roles. The new owner will receive the owner.
POST
/
v1
/
organization
/
transfer-ownership
Transfer organization ownership
curl --request POST \
--url https://api.trycomp.ai/v1/organization/transfer-ownership \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"newOwnerId": "mem_xyz789"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({newOwnerId: 'mem_xyz789'})
};
fetch('https://api.trycomp.ai/v1/organization/transfer-ownership', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/organization/transfer-ownership"
payload = { "newOwnerId": "mem_xyz789" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"message": "Ownership transferred successfully",
"currentOwner": {
"memberId": "mem_abc123",
"previousRoles": [
"owner",
"employee"
],
"newRoles": [
"admin",
"employee"
]
},
"newOwner": {
"memberId": "mem_xyz789",
"previousRoles": [
"admin"
],
"newRoles": [
"admin",
"owner"
]
}
}Authorizations
API key for authentication
Body
application/json
Transfer organization ownership to another member
Response
default - application/json
Not found - Organization or member not found
Forbidden - Only organization owner can transfer ownership
Unauthorized - Invalid or missing authentication
Bad request - Invalid input
Ownership transferred successfully
Was this page helpful?

