---
title: "Transfer ownership"
method: POST
path: "/api/users/{userId}/transfer-ownership"
tags: ["User"]
---

# Transfer ownership

`POST /api/users/{userId}/transfer-ownership`

Transfers the ownership of organisation to given user.

## Path parameters

- `userId` string, uuid, required

## Response `200`

The previous owner user (now demoted to admin)

- object — The previous owner user (now demoted to admin)
  - `id` string, uuid, required — Unique identifier of the user
  - `email` string, email, required — Email address of the user
  - `firstName` string, nullable — First name of the user
  - `lastName` string, nullable — Last name of the user
  - `type` 'invited' | 'member' | 'author' | 'admin' | 'owner', required — User type/role within the organisation
  - `status` 'active' | 'disabled' | 'locked', required — Current status of the user account
  - `isService` boolean — Whether this is a service account
  - `roles` object[] — Roles assigned to the user
    - `id` string, uuid, required — Unique identifier of the role
    - `name` string, required — Name of the role
    - `description` string, nullable — Description of the role
  - `createdAt` string, required — Timestamp when the user was created
  - `updatedAt` string, required — Timestamp when the user was last updated

---

[API](https://skmtc.dev/gorules/apis/gorules-agent-api.md) · [All operations](https://skmtc.dev/gorules/apis/gorules-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gorules/gorules-agent-api/revisions/52c0773fcd80/schema)
