APIAuth

Replace a user's roles

Replace the roles a person holds.

PUT
/users/{user_id}/roles

Replace the roles a person holds.

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.

Required permission

manage_roles

Path Parameters

user_id*string
Formatuuid

Request Body

application/json
  1. body

The roles a person holds. Replacing the set is how roles are assigned.

role_ids*array<>

Response Body

The request has succeeded.

application/json
  1. response
items*array<>
curl -X PUT "https://example.com/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/roles" \  -H "Content-Type: application/json" \  -d '{    "role_ids": [      "3805f8ab-a16f-4b9c-912c-4f3e3ae2a6f1"    ]  }'
{  "items": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string",      "system": true    }  ]}