Set member role
Sets a member's role. 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 also pass a fresh step-up reauthentication in the app (without it the call answers 428 step_up_required). An organization API token is not challenged.
Request
- Base URL: https://api.elaichi.ai
- URL: https://api.elaichi.ai/member/{userId}
- Auth: HTTP bearer
Path parameters
User id (usr_…) of an org member.
Headers
Target organization (org_…). Required for cookie/session auth on org-scoped routes; optional for API tokens, which carry their organization, and rejected when it names a different one.
Request body
Response
OK
Changes
No recorded changes to this operation across all 1 revision of this API.