Atlas
Admin — Roles

Assign role to user

Assigns a role to a user within the admin's active organization. The role must exist in the organization.

PUT
/api/v1/admin/roles/users/{userId}/role

Path Parameters

userId*string
Length1 <= length <= 128

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "http://localhost:3001/api/v1/admin/roles/users/user_abc123/role" \  -H "Content-Type: application/json" \  -d '{    "role": "string"  }'
{
  "userId": "string",
  "role": "string"
}
{
  "error": "string",
  "message": "string",
  "requestId": "string"
}
{
  "property1": null,
  "property2": null
}
{
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "message": "string",
  "requestId": "string"
}
{
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "message": "string",
  "requestId": "string"
}