EmployeeGroup
Required product: SwitchEmployee groups are collections of employees that can be used to dial or transfer to multiple employees at once.
- Properties
- Get all EmployeeGroupss
- Get a single EmployeeGroup by ID
- Create a new EmployeeGroup
- Update an EmployeeGroup
- Add the authenticated employee to an EmployeeGroup
- Remove the authenticated employee to an EmployeeGroup
- Send a text message to an EmployeeGroup
EmployeeGroup properties
Name | Description |
employee_ids |
{"employee_ids":[1,2,3]}ID’s of the employees in this group. |
id |
{"id":1}Employee group ID. |
live_presence |
{"live_presence":"available"}The current presence status of the employee group.
|
name |
{"name":"Support"}Employee group name. |
speed_dial |
{"speed_dial":{"digit":1}}The digit that is used to transfer calls to this employee group. |
Get all EmployeeGroupss
Returns an array of all employee groups.
Request
GET /api/v2/employee_groups
Response
Status: 200 OK
{ "employee_groups": [ { "id": 1, "name": "Support", "live_presence": "available", "speed_dial": { "digit": 123 }, "employee_ids": [ 1, 2 ] } ] }
Get a single EmployeeGroup by ID
Returns the employee group with the specified ID.
Request
GET /api/v2/employee_groups/:id
Response
Status: 200 OK
{ "employee_group": { "id": 1, "name": "Support", "live_presence": "available", "speed_dial": { "digit": 123 }, "employee_ids": [ 1, 2 ] } }
Create a new EmployeeGroup
Creates a new employee group.
Properties
Name | Description |
name |
{"name":"Support"}Name of the employee group. |
employee_ids |
{"employee_ids":[1,2,3]}ID’s of employees to be added to the group. |
Request
POST /api/v2/employee_groups
{ "employee_group": { "name": "Support", "employee_ids": [ 1, 2 ] } }
Response
Status: 200 OK
{ "employee_group": { "employee_ids": [ 1, 2 ], "id": 1, "live_presence": "available", "name": "Support", "speed_dial": null } }
Update an EmployeeGroup
Updates an employee group.
Properties
Name | Description |
name |
{"name":"Support"}Name of the employee group. |
employee_ids |
{"employee_ids":[1,2,3]}ID’s of employees to be added to the group. |
Request
PUT /api/v2/employee_groups/:id
{ "employee_group": { "name": "Support", "employee_ids": [ 1, 2 ] } }
Response
Status: 200 OK
{ "employee_group": { "id": 1, "name": "Support", "live_presence": "available", "speed_dial": { "digit": 123 }, "employee_ids": [ 1, 2 ] } }
Add the authenticated employee to an EmployeeGroup
Add the authenticated employee to this employee group.
Request
POST /api/v2/employee_groups/:employee_group_id/join
Response
Status: 200 OK
{ "employee_group": { "id": 1, "name": "Support", "live_presence": "available", "speed_dial": { "digit": 123 }, "employee_ids": [ 1, 2 ] } }
Remove the authenticated employee to an EmployeeGroup
Remove the authenticated employee from this employee group.
Request
POST /api/v2/employee_groups/:employee_group_id/leave
Response
Status: 200 OK
{ "employee_group": { "id": 1, "name": "Support", "live_presence": "available", "speed_dial": { "digit": 123 }, "employee_ids": [ 1, 2 ] } }
Send a text message to an EmployeeGroup
Send an SMS message to all employees in this group. The sender will be shown as either the authenticated employee’s number or name.
Beware: these are cheap, but not free. Take a look at the pricelist - look for Web SMS.
This feature is not available for companies in trial.
Properties
Name | Description |
body |
{"body":"Hello, world."}The content of the SMS. |
Request
POST /api/v2/employee_groups/:employee_group_id/message
{ "body": "Hello, world." }
Response
Status: 200 OK
{ "sent": 3 }