Members and roles
Change a member's role
Permission
members:updateAuthenticationPATCH
Assigns a workspace role. The new role cannot exceed the caller's permissions, and the last owner cannot be demoted. A semantic no-op preserves the resource version and ETag.
bearerAuthheader
AuthorizationBearer <token>Use a Voice API key or connected-app OAuth access token. Authentication.
id*stringFormat
uuidIf-Match?stringOptional strong ETag (or *) from a prior response. A stale tag returns 412 without changing the resource.
application/json- body
role_id*stringFormat
uuidUpdated member, or the unchanged member for a semantic no-op.
application/json- response
membership_id*stringFormat
uuiduser_id*stringFormat
uuidemail*stringFormat
emaildisplay_name*stringrole_id*stringFormat
uuidrole*stringLength
1 <= lengthversion*integerFormat
int64Range
1 <= valuecreated_at*stringFormat
date-timeupdated_at*stringFormat
date-timeis_protected*booleanTrue for the platform's protected owner account. It can never be removed, demoted, disabled or have its credentials reset by another member.
curl -X PATCH 'https://api.kejue.co/v1/members/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{ "role_id": "ac4e70c8-d5be-48af-93eb-760f58fc91a9"}'Example Response
{ "membership_id": "a4a28f8e-1ae6-49f7-beed-4e090aa324f4", "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5", "email": "user@example.com", "display_name": "string", "role_id": "ac4e70c8-d5be-48af-93eb-760f58fc91a9", "role": "string", "version": 1, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "is_protected": true}