Skip to content

Transfer organization ownership

POST
/v1/organization/transfer-ownership
curl --request POST \
--url https://api.varman.io/v1/organization/transfer-ownership \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "newOwnerId": "mem_xyz789", "userId": "usr_abc123def456" }'

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 role while keeping their existing roles. Only the current organization owner can.

Transfer organization ownership to another member

Media typeapplication/json
object
newOwnerId
required

Member ID of the new owner

string

Example

mem_xyz789
userId

User ID of the current owner initiating the transfer (required for API key auth, ignored for JWT auth)

string

Example

usr_abc123def456

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

Media typeapplication/json
object
success
boolean
message
string
currentOwner
object
memberId
string
previousRoles
Array<string>
newRoles
Array<string>
newOwner
object
memberId
string
previousRoles
Array<string>
newRoles
Array<string>

Example

{
"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"
]
}
}