From Bright Pattern Documentation
Jump to: navigation, search
 
(Updated via BpDeleteTranslateTags script)
 
(8 intermediate revisions by one other user not shown)
Line 1: Line 1:
<translate>= Create User=
+
= Create User=
This API is used to create a new user in the system.
+
Creates a new user in the system.
  
 +
== Request ==
 +
=== URL ===
 +
http[s]://<host>/configapi/v2/user
  
== URL ==
+
For example:
http[s]://<host>:<port>/configapi/v2/user
+
http://example.com/configapi/v2/user
  
== Method ==
+
=== HTTP Method ===
 
POST
 
POST
  
== Request Payload ==
+
=== Content-Type ===
{
+
application/json
"loginId": "test008",
 
"password": "top secret",
 
"firstName": "test",
 
"lastName": "008",
 
"team": "Maintenance Renewal",
 
                   
 
"extension": "2072",
 
"workPhone": "123456",
 
"mobilePhone": "78910",
 
"email": "test008@nowhere.net",
 
"disabled": false,
 
"changePassword": true,
 
"skills": {
 
  "Maintenance Renewal": 100,
 
  "English": 33
 
},
 
"roles": [
 
  "Agent",
 
  "Supervisor"
 
]
 
}
 
  
 +
=== Parameters ===
 +
{|border="1" style="border-collapse:collapse" cellpadding="5"
 +
| '''Parameter'''
 +
| '''Data-Type'''
 +
| '''Description'''
 +
| '''Example'''
 +
|-
 +
| loginId
 +
| string
 +
| The username of the new user
 +
| "sheila.thomas"
 +
|-
 +
| firstName
 +
| string
 +
| The first name of the new user
 +
| "Sheila"
 +
|-
 +
| lastName
 +
| string
 +
| The last name of the new user
 +
| "Thomas"
 +
|-
 +
| team
 +
| string
 +
| The name of the team assigned to the new user
 +
| "Customer Service"
 +
|-
 +
| extension
 +
| number
 +
| The user's extension number
 +
| "1072"
 +
|-
 +
| workPhone
 +
| string
 +
| "4151234567"
 +
| The user's work phone number
 +
|-
 +
| mobilePhone
 +
| string
 +
| "6501234567"
 +
| The user's mobile phone number
 +
|-
 +
| email
 +
| string
 +
| The email address of the new user
 +
| "sheila.thomas@yourcompany.com"
 +
|-
 +
| disabled
 +
| Boolean
 +
| Whether the user account is disabled ("true") or active ("false")
 +
| true|false
 +
|-
 +
| changePassword
 +
| Boolean
 +
| Whether the user must change password ("true") upon next login or not ("false")
 +
| true|false
 +
|-
 +
| skills
 +
| object
 +
| The skills and percentage values assigned to the user
 +
| {"Spanish": 100, "English": 100}
 +
|-
 +
| roles
 +
| array
 +
| The role assigned to the new user
 +
| ["Agent", "Supervisor"]
 +
|}
  
 +
=== Example Request Body Content ===
 +
<syntaxhighlight  lang="json">
 +
{
 +
    "loginId": "sheila.thomas",
 +
    "password": "ChangeMe",
 +
    "firstName": "Sheila",
 +
    "lastName": "Thomas",
 +
    "team": "Customer Service",
 +
    "extension": "1072",
 +
    "workPhone": "4151234567",
 +
    "mobilePhone": "6501234567",
 +
    "email": "sheila.thomas@nowhere.net",
 +
    "disabled": false,
 +
    "changePassword": true,
 +
    "skills": {
 +
        "Spanish": 100,
 +
        "English": 100
 +
    },
 +
    "roles": [
 +
        "Agent",
 +
        "Supervisor"
 +
    ]
 +
}
 +
</syntaxhighlight>
  
  
<center>[[user-management-api-specification/GetUserData|< Previous]] | [[user-management-api-specification/UpdateUser|Next >]]</center>
+
== Response ==
</translate>
+
In response to a successful request, the new user is created. Verify the new user in ''Contact Center Administrator > Users & Teams > [[5.3:Contact-center-administrator-guide/Users | Users]]''.
 +
 
 +
Failed requests result in an error code, and the user is not created.
 +
 
 +
=== Response Codes ===
 +
{|border="1" style="border-collapse:collapse" cellpadding="5"
 +
| '''Code'''
 +
| '''Description'''
 +
|-
 +
| 200 OK
 +
| Success - user created
 +
|-
 +
| 400
 +
| Bad request
 +
|-
 +
| 405
 +
| Method not allowed
 +
|}

Latest revision as of 04:32, 29 May 2024

• 5.2

Create User

Creates a new user in the system.

Request

URL

http[s]://<host>/configapi/v2/user

For example:

http://example.com/configapi/v2/user

HTTP Method

POST

Content-Type

application/json

Parameters

Parameter Data-Type Description Example
loginId string The username of the new user "sheila.thomas"
firstName string The first name of the new user "Sheila"
lastName string The last name of the new user "Thomas"
team string The name of the team assigned to the new user "Customer Service"
extension number The user's extension number "1072"
workPhone string "4151234567" The user's work phone number
mobilePhone string "6501234567" The user's mobile phone number
email string The email address of the new user "sheila.thomas@yourcompany.com"
disabled Boolean Whether the user account is disabled ("true") or active ("false") false
changePassword Boolean Whether the user must change password ("true") upon next login or not ("false") false
skills object The skills and percentage values assigned to the user {"Spanish": 100, "English": 100}
roles array The role assigned to the new user ["Agent", "Supervisor"]

Example Request Body Content

{
    "loginId": "sheila.thomas",
    "password": "ChangeMe",
    "firstName": "Sheila",
    "lastName": "Thomas",
    "team": "Customer Service",
    "extension": "1072",
    "workPhone": "4151234567",
    "mobilePhone": "6501234567",
    "email": "sheila.thomas@nowhere.net",
    "disabled": false,
    "changePassword": true,
    "skills": {
        "Spanish": 100,
        "English": 100
    },
    "roles": [
        "Agent",
        "Supervisor"
    ]
}


Response

In response to a successful request, the new user is created. Verify the new user in Contact Center Administrator > Users & Teams > Users.

Failed requests result in an error code, and the user is not created.

Response Codes

Code Description
200 OK Success - user created
400 Bad request
405 Method not allowed
< Previous | Next >