Skip to content
PATCH /member/{userId}

**A member holds exactly one role per organization.** `role_ids` must contain exactly one id and REPLACES whatever they held; zero or two or more answers 400 `role_cardinality`. To combine two roles' permissions, author a custom role (`POST /role`) — a second assignment would create a privilege level no role names. Takes effect on the member's next request. Requires `member:manage`, and you may only assign a role whose permissions you hold yourself, so a member admin cannot promote anyone (including themselves) past their own level. A BROWSER SESSION must additionally carry a fresh step-up reauthentication (`X-Step-Up-Token`, obtained from `/auth/step-up`); without one the call answers `428 step_up_required` and `error.details` names the action and resource to prove. An organization API token is not challenged: step-up re-proves the person behind a session, and a token has no person behind it.

Path Parameters

userIdstring
required·

User id (usr_…) of an org member.

Request Body

role_idsstring[]

Exactly one role (role_…). It replaces the member's current role.

Response Body

joined_atstring · date-time
rolesobject[]

Roles held. Replace the whole set with PATCH /member/{userId}.

idstring

Role id (role_…).

is_systemboolean
namestring
seat_classstring
Possible values:
billablefree_admin
statusstring

Only active members can act in the organization.

teamsobject[]
idstring

Team id (team_…).

namestring
userobject,null

Global profile. Null when the profile row could not be resolved.

avatar_urlstring,null
emailstring · email
idstring
namestring,null
user_idstring

User id (usr_…). A membership has no id of its own.

viastring,null

How they joined — invite, verified domain, SCIM, and so on.

curl -X PATCH 'https://api.elaichi.ai/member/<userId>' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"role_ids":[]}'
const body = {
  "role_ids": []
};

const response = await fetch('https://api.elaichi.ai/member/<userId>', {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import os
import requests

url = "https://api.elaichi.ai/member/<userId>"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "role_ids": []
}

response = requests.patch(url, headers=headers, json=payload)
print(response.json())