User Organization Transfer Ownership Create
POST /api/users/organization/<unique_organization_id>/transfer-ownership/ - Transfer organization ownership
Transfers ownership of an organization from the current owner to another member.
Only the current owner can initiate this transfer.
Request Body:
- new_owner_id (int, optional): ID of the new owner
- new_owner_email (string, optional): Email of the new owner
- Exactly one of new_owner_id or new_owner_email must be provided
Response (200 OK):
{
"message": "Ownership transferred successfully",
"organization_id": 123,
"new_owner_id": 456,
"new_owner_email": "newowner@example.com"
}
Error Responses:
- 400: Invalid request (validation errors, cannot transfer to current owner)
- 403: User is not the organization owner
- 404: Organization not found, or new owner not found/not a member
Authentication
AuthorizationBearer
JWT access token or Respan API key
Path parameters
unique_organization_id
Request
This endpoint expects an object.
new_owner_id
new_owner_email
Response
No response body