Register New Department

Body Parameters

Example Call

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": "john@doe.com", 
             "showOnOfflineForm": true }, 
         "agents": [{ 
             "agentId": "SQafHvoFPuB57NmBD" }] }'

Example Response

{
  "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
}

Change Log

Last updated

Rocket.Chat versions receive support for six months after release.