Cention
API Documentation
Cention Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Cention Agent API

Introduction

This Cention Agent API is organized around REST. It is meant to include everything necessary to manage agents in Cention Contact Center programmatically.

Workspaces

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.

Notation of this document

  • :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.

Authentication

Use HTTP header Authorization: Authorization CENTION1-HMAC-SHA256 <access-key-id>,<signature>

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"))

Field optional unless specify

Omitted field will not be processed and will not be return as response data unless there is indirect effect change.

Error response

{
	"error": "error message",
}

Base URL

https://api.cention.com/s/:workspace/v1/agent

Create an Agent

POST https://api.cention.com/s/:workspace/v1/agent

Creates an Agent.

Parameters

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.

Languages

Name Code
Danish da
English en
Finnish fi
Norwegian Bokmal nb
Swedish sv

Time zones

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

Response

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

Update an Agent

PUT https://api.cention.com/s/:workspace/v1/agent/:id

Updates an Agent.

Parameters

Refer to Create an Agent’s parameters table.

Response

{
	"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 an Agent

DELETE https://api.cention.com/s/:workspace/v1/agent/:id

No parameter

Response

Deletes an Agent.

{
	"id": 195,
	"deleted": true
}

List all Agents

GET https://api.cention.com/s/:workspace/v1/agent

Get all agents

No parameter

Response

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

Create an Agent Access Key

POST https://api.cention.com/s/:workspace/v1/agent/:id/access-key

Parameters

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.

Response

{
	"access_key_id": "qj7w6uVJG3HLg5pT^%d5H8PuJyXN#XZ68kDjZdGP",
	"secret_access_key": "6zMsEv3diD(FJhe$%MBsmv72MpWBEf2VS7EAivLN",
	"expiry": 123
}

Revoke an Agent Access Key

DELETE https://api.cention.com/s/:workspace/v1/agent/:id/access-key/:access-key-id

Revoke specified Agent Access key from specified agent.

No parameter

Response

{
	"access_key_id": "qj7w6uVJG3HLg5pT^%d5H8PuJyXN#XZ68kDjZdGP",
        "deleted": true
}

Create an Agent Group

POST https://api.cention.com/s/:workspace/v1/agent-group

Create an Agent Group. Agent Groups are used for giving agents access to areas.

Parameters

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

Response

{
	"id": 690,
	"agents": [100, 222, 316],
	"areas": [3, 1, 6],
	"name": "Agents"
}

Update an Agent Group

PUT https://api.cention.com/s/:workspace/v1/agent-group/:id

Update an Agent Group. All fields are optional.

Parameters

Refer to Create an Agent Group’s parameters table.

Response

Update an Agent Group. All fields are optional.

{
	"id": 690,
	"name": "Agents"
}

Add Agent to Agent Group**

POST https://api.cention.com/s/:workspace/v1/agent-group/:id/add-agent

Parameters

Name Type Description
agents array Integer list of agent ids to add to Agent Group

Response

{
	"id": 690,
	"name": "Agents"
}

Remove Agent from Agent Group**

POST https://api.cention.com/s/:workspace/v1/agent-group/:id/remove-agent

Parameters

Name Type Description
agents array Integer list of agent ids to remove from Agent Group

Response

{
	"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 an Agent Group

DELETE https://api.cention.com/s/:workspace/v1/agent-group/:id

No parameter

Response

Deletes an agent group.

{
	"id": 195,
	"deleted": true
}