> ## Documentation Index
> Fetch the complete documentation index at: https://docs.timbrix.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Transfer Ownership

Hands an organization over to another member. The new owner gets the `owner` role and you become an `admin`.

Transfer ownership before [deleting your account](https://docs.timbrix.mx/api-reference/users/delete-me.md) if you are the only owner of an active organization.

## Authentication

* **Authorization**: `Bearer <token>`

Only the organization **owner** can transfer it, and only with a user session token. API keys and OAuth tokens are rejected. A closed organization cannot be transferred.

## Path Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `id` | string | Yes | Organization UUID |

## Request Body

| Field | Type | Required | Description |
| - | - | - | - |
| `newOwnerUserId` | string | Yes | User ID of an existing member of the organization |

## Example Request

```bash theme={null}
curl -X POST https://api.timbrix.mx/organizations/550e8400-e29b-41d4-a716-446655440000/transfer-ownership \
  -H "Authorization: Bearer <your_token>" \
  -H "Content-Type: application/json" \
  -d '{ "newOwnerUserId": "7c9e6679-7425-40de-944b-e07fc1f90ae7" }'
```

```typescript theme={null}
import { Timbrix } from "@timbrix/sdk"

const client = new Timbrix({ bearerToken: "<your_token>" })

await client.organizations.transferOwnership(
  "550e8400-e29b-41d4-a716-446655440000",
  "7c9e6679-7425-40de-944b-e07fc1f90ae7"
)
```

## Example Response

Returns the organization details (same shape as [Get Organization](https://docs.timbrix.mx/api-reference/organizations/get.md)). Status: `200 OK`.

## Webhooks

Two [`member.role_updated`](https://docs.timbrix.mx/api-reference/webhooks/create) events are sent: one for the new owner (`newRole: "owner"`) and one for the previous owner (`newRole: "admin"`).

## Common Errors

### 403 Forbidden

Only the owner can transfer the organization, or the organization is closed.

### 404 Not Found

The target user is not a member of the organization.

### 422 CANNOT\_TRANSFER\_TO\_SELF

`newOwnerUserId` is your own user ID. Choose another member.

```json theme={null}
{
  "statusCode": 422,
  "message": "Elige a otro miembro para transferirle la propiedad de la organización.",
  "error": "CANNOT_TRANSFER_TO_SELF"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.