Description

Create a user

ATTENTION: Beginning on 5/24/2023 all new users created will require a password that meets new minimum password complexity requirements:

  • Length between 8 and 64 characters
  • Must include lower case (a-z), upper case (A-Z) and numbers (0-9)
  • Must include special characters (!@#$%^&*)
  • Must not contain < or > or blank spaces

Parameters

Name Type Required Optional Searchable Note
siteid numeric REQUIRED, Passed via URI
username string REQUIRED, Passed via BODY
firstname string REQUIRED, Passed via BODY
password string REQUIRED, Passed via BODY
lastname string REQUIRED, Passed via BODY
employeeid string OPTIONAL, Passed via BODY

Examples

Example Request

http://devsandbox.targetsolutions.com/v1/sites/{siteid}/users

Example Header

POST /sites/{siteid}/users HTTP/1.1
Host: http://devsandbox.targetsolutions.com/v1
AccessToken: bjTk3YLcR2fstogVs3nBOQ==
Cache-Control: no-cache

Example Body JSON

{
  "username":"random username data",
  "firstname":"random firstname data",
  "password":"random password data",
  "lastname":"random lastname data"
}

Possible Results Sets

Results Set

{
  "firstname": "random firstname data",
  "siteid": 12,
  "employeeid": "",
  "email": "",
  "username": "random username data",
  "status": "Offline",
  "lastname": "random lastname data",
  "userid": 484703
}

Access Denied Set

{
  "httpcode":401,
  "moreinfo":"http://developers.targetsolutions.com/v1/responsecodes/800",
  "developermessage":"A request was made to a resource that you do not have ownership of.",
  "statuscode":800,
  "status":"access denied"
}