Cention Agent API
This Cention Agent API is organized around REST. It is meant to include everything necessary to manage agents in Cention Contact Center programmatically.
Cention Contact Center is centered around workspaces (spaces for short). Agents are unique to a workspace and therefore workspace must be specified in the URL for each request.
:id
variable integer. Eg:1
,200
,123
, etc.:workspace
variable string. Eg:televox
.<access-key-id>
,:access-key-id
variable string of access key id. Eg:b1Ze9QZzl_4aVmyKstVd3r7V4pXLkGwoXkN79adh
.<access-key-secret>
variable string of access key secret.<signature>
variable signature string result from HMAC SHA256 concatenation several parts of the API request with colon as separator, encoded in hexadecimal string. Eg:46cbf972d16ccb1f4e5a8b5888316898c55d105dc1411dea2451a7216840456e
HMAC-SHA256
HMAC SHA25 operation function which take argment<access-key-secret>
and data of concatenation of API parts with colon as separator.hexString
function take convert bytes to hexadecimal string.
Use HTTP header Authorization: Authorization CENTION1-HMAC-SHA256 <access-key-id>,<signature>
Use HMAC SHA256 HMAC-SHA256(<access-key-secret>, <access-key-id>:<space>:<api-path>:<field-value-1>:<field-value-2>...)
Example: hexString(hmacSHA256("secret", "xyz:space:/v1/agent/1:admin:myusername"))
NOTE: Field values are order by field key ascending alphanumerically. Eg, value of field login_name
come first before value of field user_name
.
Array data is calculated using comma seperator field. Eg, array [1, 2, 3]
will become 1,2,3
. Example: hexString(hmacSHA256("secret", "xyz:space:/v1/agent-group/1:1,2,3"))
Omitted field will not be processed and will not be return as response data unless there is indirect effect change.
{
"error": "error message",
}
https://apid.cention.com/s/:workspace/v1/agent
POST https://apid.cention.com/s/:workspace/v1/agent
Creates an Agent.
Name | Type | Description |
---|---|---|
login_name* | string | Agent’s login name, must be unique |
admin_level | string | Can be agent, observer or administrator |
user_name* | string | Agent’s identifiable name, usally person’s full name |
email_address | string | Agent’s email address |
external_id | string | External identifier for agent in other system |
bright_reference_code | string | Reference code for agent in Bright |
signature_name | string | Agent’s name in outgoing signatures |
chat_name | string | Agent’s outgoing name while in chat with clients |
language | string | Agent’s interface language code (refer to Languages table). Default to en |
time_zone | string | Agent’s time zone abbrevation (refer to Time zones table). Default to system group feature or GMT |
activate | string | Agent’s active status, can be true or false. Set this to true during update to re-activate a deleted agent |
list_size | string | Agent’s default errand list size. Defaulted to 10 during create agent |
* Field must exist during creation.
Name | Code |
---|---|
Danish | da |
English | en |
Finnish | fi |
Norwegian Bokmal | nb |
Swedish | sv |
Time zone | Abbrevation |
---|---|
Pacific/Midway (GMT-11) | SST |
US/Hawaii (GMT-10) | HDT |
US/Alaska (GMT-9) | AKDT |
US/Pacific (GMT-8) | PST |
US/Arizona (GMT-7) | MST |
US/Central (GMT-6) | CST |
US/Eastern (GMT-5) | EST |
Brazil/West (GMT-4) | AMT |
America/Buenos_Aires (GMT-3) | ART |
Atlantic/South_Georgia (GMT-2) | GST |
Atlantic/Cape_Verde (GMT-1) | CVT |
GMT (GMT+0) | GMT |
Europe/London (GMT+0) | BST |
Europe/Stockholm (GMT+1) | CET |
Europe/Helsinki (GMT+2) | EET |
Europe/Moscow (GMT+3) | MSK |
Asia/Baghdad (GMT+3) | AST |
Asia/Dubai (GMT+4) | GST |
Asia/Karachi (GMT+5) | PKT |
Asia/Dhaka (GMT+6) | BDT |
Asia/Jakarta (GMT+7) | WIB |
Asia/Kuala_Lumpur (GMT+8) | MYT |
Asia/Manila (GMT+8) | PHT |
Asia/Seoul (GMT+9) | KST |
Australia/Canberra (GMT+10) | AEDT |
Asia/Vladivostok (GMT+11) | VLAT |
Pacific/Auckland (GMT+12) | NZST |
{
"id": 195,
"login_name": "carman@company.com",
"admin_level": "agent",
"user_name": "Carman Stockinger",
"external_id": "743",
"bright_reference_code": "",
"signature_name": "Carman",
"chat_name": "Carman"
}
PUT https://apid.cention.com/s/:workspace/v1/agent/:id
Updates an Agent.
Refer to Create an Agent
’s parameters table.
{
"id": 195,
"login_name": "carman@company.com",
"admin_level": "agent",
"user_name": "Carman Stockinger",
"external_id": "743",
"bright_reference_code": "",
"signature_name": "Carman",
"chat_name": "Carman",
"activate": "true"
}
DELETE https://apid.cention.com/s/:workspace/v1/agent/:id
Deletes an Agent.
{
"id": 195,
"deleted": true
}
GET https://apid.cention.com/s/:workspace/v1/agent
Get all agents
{
"data": [{
"id": 195,
"login_name": "carman@company.com",
"user_name": "Carman Stockinger",
"active": true
},{
"id": 196,
"login_name": "john@company.com",
"user_name": "John",
"active": true
},{
"id": 197,
"login_name": "mary@company.com",
"user_name": "Mary",
"active": false
}]
}
POST https://apid.cention.com/s/:workspace/v1/agent/:id/access-key
Name | Type | Description |
---|---|---|
expiry | integer | Expiry date timestamp in unix format. Zero mean no expiry |
Create an Agent Access Key for specified agent that can be used to login the agent programmatically using window.PostMessage()
API.
{
"access_key_id": "qj7w6uVJG3HLg5pT^%d5H8PuJyXN#XZ68kDjZdGP",
"secret_access_key": "6zMsEv3diD(FJhe$%MBsmv72MpWBEf2VS7EAivLN",
"expiry": 123
}
DELETE https://apid.cention.com/s/:workspace/v1/agent/:id/access-key/:access-key-id
Revoke specified Agent Access key from specified agent.
{
"access_key_id": "qj7w6uVJG3HLg5pT^%d5H8PuJyXN#XZ68kDjZdGP",
"deleted": true
}
POST https://apid.cention.com/s/:workspace/v1/agent-group
Create an Agent Group. Agent Groups are used for giving agents access to areas.
Name | Type | Description |
---|---|---|
name | string | Name of new Agent Group |
agents | array | Integer list of agent ids to add to Agent Group |
areas | array | Integer list of area ids to add to Agent Group |
description | string | Description for the group |
{
"id": 690,
"agents": [100, 222, 316],
"areas": [3, 1, 6],
"name": "Agents"
}
PUT https://apid.cention.com/s/:workspace/v1/agent-group/:id
Update an Agent Group. All fields are optional.
Refer to Create an Agent Group
’s parameters table.
Update an Agent Group. All fields are optional.
{
"id": 690,
"name": "Agents"
}
POST https://apid.cention.com/s/:workspace/v1/agent-group/:id/add-agent
Name | Type | Description |
---|---|---|
agents | array | Integer list of agent ids to add to Agent Group |
{
"id": 690,
"name": "Agents"
}
POST https://apid.cention.com/s/:workspace/v1/agent-group/:id/remove-agent
Name | Type | Description |
---|---|---|
agents | array | Integer list of agent ids to remove from Agent Group |
{
"id": 690,
"name": "Agents"
}
** These endpoints’ response don’t reflect the agent-group state. It just response the parameters. If server alters the parameter, then response will alter too.
DELETE https://apid.cention.com/s/:workspace/v1/agent-group/:id
Deletes an agent group.
{
"id": 195,
"deleted": true
}