Skip to main content
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"
}
'
{
  "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"
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://www.trycomp.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-Key
string
header
required

API key for authentication

Body

application/json

Transfer organization ownership to another member

newOwnerId
string
required

Member ID of the new owner

Example:

"mem_xyz789"

userId
string

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

Example:

"usr_abc123def456"

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

success
boolean
Example:

true

message
string
Example:

"Ownership transferred successfully"

currentOwner
object
newOwner
object