Register New Department
HTTP Method | URL | Requires Auth |
---|---|---|
POST | /api/v1/livechat/department |
Key | Example Value | Description |
---|---|---|
department * | { "department": { ... } } | The object which takes the department details. |
name * | testDept | The name of the department you are creating. |
email * | The email ID associated with the department. | |
enabled * | false | Whether you want to enable the department. The value can be boolean true or false . |
showOnRegistration * | false | You can let visitors choose the department they want to talk to. The option will appear to your customer in the Live Chat widget. The value can be boolean true or false . |
showOnOfflineForm * | false | If you want your department to be displayed during off-business hours.
The value can be boolean true or false . |
description | Test department | A description of your department. |
agents | { "agents": { ... } } | The object with the agent details that you want to add to the department. |
agentId | SQafHvoFPuB57NmBD | The agent ID that you want to assign to the department. |
count | 2 | |
order | 1 | |
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/department \
-d '{
"department":
{"enabled": false,
"showOnRegistration": true,
"name": "new from api",
"email": "[email protected]",
"showOnOfflineForm": true },
"agents": [{
"agentId": "SQafHvoFPuB57NmBD" }] }'
{
"department": {
"enabled": false,
"name": "new from api",
"numAgents": 1,
"showOnRegistration": true,
"_updatedAt": "2016-12-13T17:22:19.109Z",
"_id": "iTfLCX3qqwKgf5uqg"
},
"agents": [
{
"agentId": "SQafHvoFPuB57NmBD",
"count": 0,
"order": 0,
}
],
"success": true
}
Version | Description |
---|---|
1.0.0 | New fields for department updated |
0.42.0 | Added |
Last modified 6d ago