Skip to content
Website API / Team

Change a member’s role

PATCHhttps://<your Reveata origin>/api/v1/websites/{website}/members/{userId}

Sets the role to viewer, editor or admin. The owner’s role cannot change (transfer ownership in the dashboard) and you cannot change your own. Needs the admin role.

Related: List members and Remove a member in Team.

Try in playground

Request

Path parameters

websitestringrequired

Website id or domain, e.g. example.com

1–253 characters

userIdstringrequired

Pattern: ^[a-f0-9]{24}$

Headers

Authorizationstringrequired

Bearer followed by an account token with the team:write scope.

Content-Typestringrequired

Send the body as JSON.

One of: application/json

Body fields

rolestringrequired

One of: viewer, editor, admin

Response

The new role.

{
  "status": "string",
  "data": {
    "userId": "string",
    "role": "string"
  }
}

Response fields

FieldTypeDescription
status"ok"
dataobject
data.userIdstring
data.rolestring