Organization

Transfer organization ownership

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 perform this action. Supports both API key authentication (X-API-Key header) and session authentication (Bearer token or cookies).

post/v1/organization/transfer-ownership

Request body

newOwnerIdstring required

Member ID of the new owner

userIdstring

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

Example request

{
  "newOwnerId": "mem_xyz789",
  "userId": "usr_abc123def456"
}

Response

Ownership transferred successfully

successboolean
messagestring

Example response

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

Changes