Users

Assign User to Role

Use this endpoint to assign a Role to a User.

put/users/{userId}/site-roles

Request body

site_idstring required

Identifier of the site to grant the role at. Site roles scope permissions to a single site; the user only receives the role's permissions when acting on this site. The caller's API key must have access to it.

role_idstring required

Identifier of the role to assign. The role's permissions apply only when the user is operating in the context of the specified site_id.

Example request

{
  "site_id": "beddda88-947d-4bd8-8f0c-828b187f93b2",
  "role_id": "beddda88-947d-4bd8-8f0c-828b187f93b3"
}

Response

The role was successfully assigned.

Changes