Get details of a specific user including their role. Requires admin role.
curl -X GET "https://your-auth-server.com/api/user/user_123456/role" \
-H "x-api-key: your-app-api-key" \
-H "Authorization: Bearer admin-user-token"{
"user": {
"id": "user_123456",
"email": "john@example.com",
"firstName": "John",
"lastName": "Doe",
"role": "user",
"emailVerified": true,
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}Change the role of a specific user. Requires admin role. Users cannot change their own role.
{
"role": "moderator",
"appId": "your-app-id"
}curl -X PATCH "https://your-auth-server.com/api/user/user_123456/role" \
-H "x-api-key: your-app-api-key" \
-H "Authorization: Bearer admin-user-token" \
-H "Content-Type: application/json" \
-d '{
"role": "moderator",
"appId": "your-app-id"
}'{
"message": "User role updated successfully",
"userId": "user_123456",
"newRole": "moderator"
}Standard user with basic access (default role)
Administrator with role management privileges
Moderator role for content management
Member role with extended privileges