Make a member the owner of your organisation
Hand your organisation to another member. Only the owner can, and becomes an admin. Takes a signed-in console session, never an API key.
POST
/
members
/
{account_id}
/
make-owner
# cookies.txt holds the cookies from your signed-in console session.
curl --request POST "$MITHUNAI_URL/mithunai/api/v1/members/7c9e6679-7425-40de-944b-e07fc1f90ae7/make-owner" \
--cookie cookies.txt \
--header "X-CSRF-Token: $MITHUNAI_CSRF_TOKEN"
import os
from http.cookiejar import MozillaCookieJar
import requests
jar = MozillaCookieJar("cookies.txt")
jar.load()
account_id = "7c9e6679-7425-40de-944b-e07fc1f90ae7"
response = requests.post(
f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/members/{account_id}/make-owner",
cookies=jar,
headers={"X-CSRF-Token": os.environ["MITHUNAI_CSRF_TOKEN"]},
timeout=30,
)
response.raise_for_status()
print(response.json())
// Runs in a page on the MITHUNAI console's own origin, while signed in.
// csrfToken is the value of the csrf_token cookie.
const accountId = '7c9e6679-7425-40de-944b-e07fc1f90ae7'
const response = await fetch(`/mithunai/api/v1/members/${accountId}/make-owner`, {
method: 'POST',
credentials: 'include',
headers: { 'X-CSRF-Token': csrfToken },
})
console.log(await response.json())
{
"owner": {
"account_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"email": "sam@example.com",
"name": "Sam",
"role": "owner",
"status": "active"
},
"previous_owner": {
"account_id": "3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"email": "you@example.com",
"name": "You",
"role": "admin",
"status": "active"
},
"revoked_api_keys": 0,
"notified": true
}
{ "code": "authorization_error", "message": "You do not have permission to perform this action." }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "conflict", "message": "You already own this organisation." }
Makes one of your organisation’s members its owner. An organisation always has exactly one owner, so in the same step you become an admin. You keep your seat, your sign-in and everything an admin can do; you can no longer transfer ownership, and only the new owner can give it back.
Only the current owner can do this. The person must already be a member of your organisation, and their account must be active. To hand the organisation to someone who is not a member yet, invite them first.
Two other things happen:
- Any API key you created with the owner role is revoked, because an admin cannot create one. Keys you created with other roles keep working. The response says how many were revoked.
- Both of you are sent an email saying the owner has changed, if your deployment can send email.
notifiedin the response says whether both messages went. The change stands either way.
X-CSRF-Token header set to the value of the csrf_token cookie. A request authenticated with an mithunai_sk_ key is refused with 403. There is no request body.
If you are not the owner you get 403. Naming yourself, or a member whose account is not active, returns 409. A member who does not exist, a member of another organisation and a malformed ID all return the same 404. See Members.
string
required
The account ID (UUID) of the member who will become the owner, as returned in
account_id by
List members.string
required
The value of your session’s
csrf_token cookie (named __Host-csrf_token when the console is
served over HTTPS without a shared cookie domain). A missing or mismatched token returns 401.Response
object
required
You, as a member with
role admin.integer
required
How many owner-role API keys you had created were revoked.
boolean
required
true when both of you were sent an email about the change.# cookies.txt holds the cookies from your signed-in console session.
curl --request POST "$MITHUNAI_URL/mithunai/api/v1/members/7c9e6679-7425-40de-944b-e07fc1f90ae7/make-owner" \
--cookie cookies.txt \
--header "X-CSRF-Token: $MITHUNAI_CSRF_TOKEN"
import os
from http.cookiejar import MozillaCookieJar
import requests
jar = MozillaCookieJar("cookies.txt")
jar.load()
account_id = "7c9e6679-7425-40de-944b-e07fc1f90ae7"
response = requests.post(
f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/members/{account_id}/make-owner",
cookies=jar,
headers={"X-CSRF-Token": os.environ["MITHUNAI_CSRF_TOKEN"]},
timeout=30,
)
response.raise_for_status()
print(response.json())
// Runs in a page on the MITHUNAI console's own origin, while signed in.
// csrfToken is the value of the csrf_token cookie.
const accountId = '7c9e6679-7425-40de-944b-e07fc1f90ae7'
const response = await fetch(`/mithunai/api/v1/members/${accountId}/make-owner`, {
method: 'POST',
credentials: 'include',
headers: { 'X-CSRF-Token': csrfToken },
})
console.log(await response.json())
{
"owner": {
"account_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"email": "sam@example.com",
"name": "Sam",
"role": "owner",
"status": "active"
},
"previous_owner": {
"account_id": "3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"email": "you@example.com",
"name": "You",
"role": "admin",
"status": "active"
},
"revoked_api_keys": 0,
"notified": true
}
{ "code": "authorization_error", "message": "You do not have permission to perform this action." }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "conflict", "message": "You already own this organisation." }
Last modified on November 7, 2026
# cookies.txt holds the cookies from your signed-in console session.
curl --request POST "$MITHUNAI_URL/mithunai/api/v1/members/7c9e6679-7425-40de-944b-e07fc1f90ae7/make-owner" \
--cookie cookies.txt \
--header "X-CSRF-Token: $MITHUNAI_CSRF_TOKEN"
import os
from http.cookiejar import MozillaCookieJar
import requests
jar = MozillaCookieJar("cookies.txt")
jar.load()
account_id = "7c9e6679-7425-40de-944b-e07fc1f90ae7"
response = requests.post(
f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/members/{account_id}/make-owner",
cookies=jar,
headers={"X-CSRF-Token": os.environ["MITHUNAI_CSRF_TOKEN"]},
timeout=30,
)
response.raise_for_status()
print(response.json())
// Runs in a page on the MITHUNAI console's own origin, while signed in.
// csrfToken is the value of the csrf_token cookie.
const accountId = '7c9e6679-7425-40de-944b-e07fc1f90ae7'
const response = await fetch(`/mithunai/api/v1/members/${accountId}/make-owner`, {
method: 'POST',
credentials: 'include',
headers: { 'X-CSRF-Token': csrfToken },
})
console.log(await response.json())
{
"owner": {
"account_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"email": "sam@example.com",
"name": "Sam",
"role": "owner",
"status": "active"
},
"previous_owner": {
"account_id": "3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"email": "you@example.com",
"name": "You",
"role": "admin",
"status": "active"
},
"revoked_api_keys": 0,
"notified": true
}
{ "code": "authorization_error", "message": "You do not have permission to perform this action." }
{ "code": "not_found", "message": "The requested resource was not found." }
{ "code": "conflict", "message": "You already own this organisation." }