Skip to Content
Members and roles

Change a member's role

Permissionmembers:updateAuthentication
PATCH
/members/{id}

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.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Header Parameters

If-Match?string

Optional strong ETag (or *) from a prior response. A stale tag returns 412 without changing the resource.

Request Body

application/json
  1. body
role_id*string
Formatuuid

Response Body

Updated member, or the unchanged member for a semantic no-op.

application/json
  1. response
membership_id*string
Formatuuid
user_id*string
Formatuuid
email*string
Formatemail
display_name*string
role_id*string
Formatuuid
role*string
Length1 <= length
version*integer
Formatint64
Range1 <= value
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
is_protected*boolean

True for the platform's protected owner account. It can never be removed, demoted, disabled or have its credentials reset by another member.

Example Request
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}