Update Member Role
Change a member's role within the organisation.
Authorization: members:manage, and the caller must hold every
permission of both the member's current role and the new one (403
permission_escalation). Callers cannot change their own role (403
cannot_change_own_role). Personal organisations have no roles to
change.
Assigning the owner role transfers ownership: the previous owner is
demoted to admin and Organisation.owner_id is repointed atomically, so
exactly one member always holds the owner role. The transfer requires
org:transfer explicitly (403 missing_permission), which has no
platform bypass: the escalation exemption of platform admins covers
assigning other roles, never ownership. The current owner cannot be demoted directly - promote
another member to owner instead.
Authorization
OAuth2AuthorizationCodeBearer In: header
Path Parameters
uuiduuidQuery Parameters
trueRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Change a member's role. role is the deprecated system-key form of
role_id; exactly one of the two is required.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/v1/organisations/497f6eca-6276-4993-bfeb-53cbbbba6f08/members/497f6eca-6276-4993-bfeb-53cbbbba6f08/role" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5", "role": "string", "role_id": "ac4e70c8-d5be-48af-93eb-760f58fc91a9", "role_ref": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "key": "string", "name": "string", "is_system": true }, "joined_at": "2019-08-24T14:15:22Z", "user": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "username": "string", "display_name": "string", "avatar_url": "string" }}{ "detail": [ { "loc": [ "string" ], "msg": "string", "type": "string" } ]}