Description
Enables you to create a new User in a defined role.
Please note that when a new user is created in SmartRecruiters, before he / she can sign in to the system, needs to activate the account. It can be performed by using the /users /activation method which activates an account straight away and allows to sign in, or by sending an activation email by using /users /activation-email method. In this case, a user will need to open a link in the activation email and follow steps on the screen.
Request
POST https://api.smartrecruiters.com/users
Path Parameters
n/a
Query Parameters
n/a
Request Body
User object needs to be passed as part of the request body. Required fields are:
name | type | description |
---|---|---|
firstName | string | first name of a User |
lastName | string | last name of a User |
string | email address of a User | |
role | string | role of a User; available values: STANDARD, EXTENDED, ADMINISTRATOR |
Optional fields are:
name | type | description |
---|---|---|
password | string | a password user will use to log in to SR; if left empty a user will have to use the Forgot Password |
ssoIdentifier | string | identifier used for the Web SSO assertion; if left empty, a user will be binded upon first login |
Response Body
Instance of the User object.
Example request
curl -i -H "X-SmartToken:abc123" -H "Content-Type: application/json;charset=utf-8" -d @body.json -X POST https://api.smartrecruiters.com/users
Example request body
{ "firstName": "John", "lastName": "Doe", "email": "john.doe@jdoe.com", "role": "STANDARD", "ssoIdentifier": "", "password": "john.DOE.123" } |
Example response
{ "id": "5490575ae4b0b8f15d918481", "firstName": "John", "lastName": "Doe", "email": "john.doe@jdoe.com", "role": "STANDARD" } |