Get a list of agents or managers. It supports the Offset, Count, and Sort Query Parameters .
URL
Requires Auth
HTTP Method
/api/v1/livechat/users/:type
yes
GET
Argument
Example
Required
Description
type
agent
Required
Can be either agent
or manager
.
curl -H " X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H " X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/livechat/users/agent
{
"users" : [
{
"_id" : "aobEdbYhXfu5hkeqG" ,
"username" : "john.doe"
} ,
{
"_id" : "SQafHvoFPuB57NmBD" ,
"username" : "doe.john"
}
] ,
"success" : true
}
Version
Description
2.2.0
Added support to pagination
0.42.0
Added
Register new agent or manager
Register a new agent or manager.
URL
Requires Auth
HTTP Method
/api/v1/livechat/users/:type
yes
POST
Argument
Example
Required
Description
type
agent
Required
Can be either agent
or manager
.
{
"username" :"john.doe"
}
curl -H " X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H " X-User-Id: aobEdbYhXfu5hkeqG" \
-X POST \
-H " Content-type:application/json" \
http://localhost:3000/api/v1/livechat/users/agent \
-d ' {"username":"john.doe"}'
{
"user" : {
"_id" : "SQafHvoFPuB57NmBD" ,
"username" : "john.doe"
} ,
"success" : true
}
Version
Description
0.42.0
Added
Get info about an agent or manager
URL
Requires Auth
HTTP Method
/api/v1/livechat/users/:type/:_id
yes
GET
Argument
Example
Required
Description
type
agent
Required
Can be either agent
or manager
.
_id
SQafHvoFPuB57NmBD
Required
The user _id
.
curl -H " X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H " X-User-Id: aobEdbYhXfu5hkeqG" \
http://localhost:3000/api/v1/livechat/users/agent/SQafHvoFPuB57NmBD
{
"user" : {
"_id" : "SQafHvoFPuB57NmBD" ,
"username" : "john.doe"
} ,
"success" : true
}
Version
Description
0.42.0
Added
Removes an agent or manager
URL
Requires Auth
HTTP Method
/api/v1/livechat/users/:type/:_id
yes
DELETE
Argument
Example
Required
Description
type
agent
Required
Can be either agent
or manager
.
_id
SQafHvoFPuB57NmBD
Required
The user _id
.
curl -H " X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H " X-User-Id: aobEdbYhXfu5hkeqG" \
-X DELETE \
http://localhost:3000/api/v1/livechat/users/agent/SQafHvoFPuB57NmBD
Version
Description
0.42.0
Added