Docs
Workspace Settings

Update member role

Update a member's role

userId is the userId field from the member list. A key cannot change its own principal's role. Organization owners are not editable here. Assigning admin - or changing anyone who currently IS an admin - additionally requires the caller to act as an organization owner or admin.

PATCH
/v2/workspaces/{workspaceId}/members/{userId}

Path Parameters

workspaceIdnumber
userIdnumber

The member's user id.

rolestring
Value in"admin" | "editor" | "viewer"

Response Body

curl -X PATCH "https://lynx-api.trulyinbox.com/v2/workspaces/0/members/0" \  -H "Content-Type: application/json" \  -d '{    "role": "admin"  }'
{
  "data": {
    "userId": 0,
    "email": "string",
    "name": {},
    "role": "owner",
    "isOrgOwner": true,
    "joinedAt": "2019-08-24T14:15:22Z"
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "details": {},
    "retry_after": 34
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "details": {},
    "retry_after": 34
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}