Overview

The Add User to a Role API adds a user to a role.   

You can use the Get Roles API to find the role ID (id) and the user ID / member ID (id).

Sample request

POST https://api.armor.com/roles/4/members/3

Input

API Call / URLMethod / Type
/roles/{id}/members/{userId}POST


ParameterDescriptionFormatRequired or optionalExample
idThe ID for the roleIntegerRequired4
userIDThe ID for the user / memberIntegerRequired3



Sample return

StatusResponse
200
{
 "roleId": 4,
 "id": 3,
 "firstName": "John",
 "lastName": "Smith",
 "email": "john.smith@example.com",
 "createdDate": "2015-01-07T00:46:24.157",
 "isEnabled": true
}
400
{
 "error": true,
 "message": "Invalid request: User cannot be found for the account"
}