Payezydevelopers
Sandbox

API reference / Organizations and teams

Transfer ownership

POST/v1/orgs/{orgId}/transfer-ownership

Makes another active member an owner and steps the calling owner down to the admin role.

Before you call it

  • Permissionorg:transfer_ownership
  • Second factorRequired for browser sessions. An API key with the scope replaces it.

Parameters

ParameterWhat it does
orgIdpath, uuidrequiredThe organization the call acts on. For platform calls, your platform's id; for customer calls, the customer's organization id. Get them from getMe or the customer list.

Request body

FieldWhat it does
user_idstring (uuid)requiredNo description in the spec yet.

Response 200

The new owner

FieldWhat it does
user_idstring (uuid)requiredNo description in the spec yet.
emailstringrequiredNo description in the spec yet.
first_namestringrequiredNo description in the spec yet.
last_namestringrequiredNo description in the spec yet.
role_keystringrequiredNo description in the spec yet.
role_namestringrequiredNo description in the spec yet.
statusenumrequiredNo description in the spec yet.

One of active disabled

joined_atstring (date-time)requiredNo description in the spec yet.

Errors to handle

CodeWhat it means and what to do
cannot_transfer_to_self422choose another member to become the owner
not_a_member422that person is not an active member of this customer

Every error is a Problem document. Branch on code; quote request_id to support.