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

Cention Organization, Area, Routing and Tag API

Introduction

This Cention Organization, Area, Routing and Tag API is organized around REST. It is meant to include everything necessary to manage organization, area, routing and tag in Cention Contact Center programmatically.

Workspaces

Cention Contact Center is centered around workspaces (spaces for short). Organization, area, routing and tag 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/org/1:myorgname")) 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",
}

Create an Organization

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

Creates an Organization.

Parameters

Name Type Description
active bool Organization’s active status, can be true or false. Set this to true during update to re-activate a deleted organization
anonymize_contact bool Organization settings for anonymize contact, can be true or false.
anonymize_day integer Organization settings for number of days before errands are anonymized. 0 for no anonymize
bright_settings struct Bright integration settings (refer to Bright table)
external_id string External identifier for organization in other system
name* string Organization’s identifiable name
pro_active_chat string Available chat slots
time_zone string Organization’s time zone abbrevation (refer to Time zones table). Default to system group feature or GMT
working_time_data map Organization’s working time settings (refer to Working time table)

* Field must exist during creation.

Bright parameters

Name Type Description
active bool Bright’s active status, can be true or false
language_code string Bright’s selected language abbreviation code (refer to languages table)
survey_reference_code string Bright’s survey reference code

Working time

Working time data can be defined by day of week such as “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday” and “Sunday”. Each day consists of following parameters.

Name Type Description
end string End of working time in format HH:MM
has_rule bool Working time rule for area to overide organization
start string Start of working time in format HH:MM
working bool Working status, true or false

Languages

Name Code
Swedish SE
Norwegian NO
Danish DK
Finnish FI

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": 1,
   "active": true,
   "anonymize_contact": true,
   "anonymize_day": 365,
   "bright_settings": {
      "active": true,
      "language_code": "SE",
      "survey_reference_code": "123"
   },
   "external_id": "123456",
   "name": "new organisation",
   "pro_active_chat": "1",
   "time_zone": "CET",
   "working_time_data": {
      "Friday": {
        "end": "18:00",
        "start": "09:00",
        "working": true
      },
      "Monday": {
        "end": "18:00",
        "start": "09:00",
        "working": true
      },
      "Saturday": {
        "end": "18:00",
        "start": "09:00",
        "working": true
      },
      "Thursday": {
        "end": "18:00",
        "start": "09:00",
        "working": true
      },
      "Tuesday":{
        "end": "18:00",
        "start": "09:00",
        "working": true
      },
      "Wednesday": {
        "end": "18:00",
        "start": "09:00",
        "working": true
      }
   }
}

Update an Organization

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

Updates an Organization.

Parameters

Refer to Create an Organization’s parameters table.

Response

{
    "id": 1,
    "active": true,
    "anonymize_contact": true,
    "anonymize_day": 365,
}

Delete an Organization

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

No parameter

Response

Deletes an Organization.

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

Create an Area

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

Create an Area.

Parameters

Name Typ e Description
active bool Area’s active status, can be true or false. Set this to true during update to re-activate a deleted area
agent_groups array List of area agent group that accessible to this area (refer to Agent’s group parameters)
anonymize_contact bool Area’s settings for anonymize contact, can be true or false.
anonymize_day integer Area’s settings for number of days before errands are anonymized. 0 for no anonymize
bright_settings struct Bright integration settings (refer to Organization’s Bright table)
chat_area_url string Chat’s url name
chat_external_id string Chat’s external identifier for area in other system
days_to_keep_errand integer Days to keep errand before deleted
default_subject_prefix string Default subject prefix
description string Description for the area
done_date struct Due date settigns (refer to Done date parameters)
due_date_move_to_areaId integer Moves errand to specified area 1 day before errand’s due date
exclude_anonymize bool Enable this option to prevent errand from anonymize
expire_time struct Errand’s expire time in inbox (refer to Expire time parameters)
external_experts_by_email bool External experts answers by email
external_experts_from_address string External experts from address
external_experts_note string Note to external experts
external_experts_pre_filled_address string External expert’s pre filled email address
external_forward_number string Number for external automatic forwarding
external_id string External identifier for area
feedback_send_out_delay integer Hours to wait before sent feedback
has_chat bool Area has chat enabled
has_postpone bool Area has postone errand enabled
has_voice bool Area has voice errand enabled
name* string Area’s name
organisation_id integer Organization’s ID
pro_active_chat string Available chat slots
remove_errand_from_area bool Enable to remove errand from area
reply_to_email_address string Reply-to’s email address
reply_to_name string Reply-to name
server_emails array Array of alias of area’s email (refer to Server email parameters)
time_zone string Area’s time zone abbrevation (refer to Time zones table). Default to system group feature or GMT
working_time_data map Area’s working time settings (refer to Working time table)

* Field must exist during creation.

Agent’s group parameters

Agent group is an array of following parameters

Name Type Description
id* integer Agent group ID
name* string Agent group’s name

Done date parameters

Name Type Description
done_date_address string Due date email address
due_date_selected integer Enable due date errand
expected_done_date_note string Notification notes to be sent to customer stating when their errand will be handled
has_done_date_notification bool Allows notification to be sent to agent owning errand when it is 2 days before the errand’s due date

Expire time parameters

Name Type Description
general_alert_time struct General expire time (refer to Hours and minutes parameter)
general_warning_time struct General warning time (refer to Hours and minutes parameter)
hold_time struct Hold time in My Errand (refer to Hours and minutes parameter)
partial_answer_alert_time struct Expire time for partly answered errands (refer to Hours and minutes parameter)
partial_answer_hold_time struct Hold time for partly answered errands (refer to Hours and minutes parameter)
partial_answer_warning_time struct Warning time for partly answered errands (refer to Hours and minutes parameter)

Hours and minutes parameters

Name Type Description
days integer Number of days
hours integer Hours
mins integer Minutes

Server email parameters

Server email is an array of following parameters

Name Type Description
id* integer Email ID, put -1 during creation
name* string Email address
order* integer Order of the email address

Response

{
   "id:: 3,
   "agent_groups": [
     {"id": 1, "name": "API Agents"}
   ],
   "anonymize_contact": true,
   "anonymize_day": 0,
   "description": "Area 1",
   "done_date": {
      "done_date_address": "notification@example.com",
      "due_date_selected": 1,
      "expected_done_date_note": "note to customer",
      "has_done_date_notification": true
   },
   "expire_time": {
      "general_alert_time": {
         "days": 1,
         "hours": 0,
         "mins": 0
      },
      "general_warning_time": {
         "days": 1,
         "hours": 0,
         "mins": 0
      },
      "hold_time": {
         "days": 1,
         "hours": 0,
         "mins": 0
      },
      "partial_answer_alert_time": {
         "days": 1,
         "hours": 0,
         "mins": 0
      },
      "partial_answer_hold_time": {
         "days": 1,
         "hours": 0,
         "mins": 0
      },
      "partial_answer_warning_time": {
         "days": 1,
         "hours": 0,
         "mins": 0
      }
   },
   "external_id": "998",
   "has_chat": true,
   "name": "Area 1",
   "organisation_id": 5,
   "reply_to_email_address": "reply-to@example.com",
   "reply_to_name": "support",
   "server_emails": [
      {
       "id": -1,
       "name": "s1@example.com",
       "order": 1
      },
      {
       "id": -1,
       "name": "s2@example.com",
       "order": 2
      }
   ],
   "time_zone": "MYT",
   "working_time_data": {
      "Friday": {
        "end": "18:00",
        "start": "09:00",
        "working": true
      },
      "Monday": {
        "end": "18:00",
        "start": "09:00",
        "working": true
      },
      "Thursday": {
        "end": "18:00",
        "start": "09:00",
        "working": true
      },
      "Tuesday":{
        "end": "18:00",
        "start": "09:00",
        "working": true
      },
      "Wednesday": {
        "end": "18:00",
        "start": "09:00",
        "working": true
      }
   }
}

Update an Area

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

Update an Area. All fields are optional.

Parameters

Refer to Create an Area’s parameters table.

Response

Update an Area. All fields are optional.

{
	"id": 3,
	"name": "Area 1 name"
}

Delete an Area

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

No parameter

Response

Deletes an Area.

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

Create a Routing for keywords

POST https://api.cention.com/s/:workspace/v1/routing/keywords

Creates a Routing for keywords.

Parameters

Name Type Description
areas* array List of area ID
content* string Content of keyword
type* string Can be any of “From”, “To”, “Subject” or “Subject or text”

* Field must exist during creation.

Response

{
   "id": 5,
   "areas": [1,2,3],
   "content": "account",
   "type": "Subject or text"
}

Update a Routing for keywords

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

Updates a Routing for keywords

Parameters

Refer to Create Routing for keywords’s parameters table.

Response

{
   "id": 5,
   "areas": [1,3],
   "content": "faulty",
   "type": "Subject or text"
}

Delete a Routing for keyword

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

No parameter

Response

Deletes a Routing for keyword.

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

Create a Routing for auto tag

POST https://api.cention.com/s/:workspace/v1/routing/autotags

Creates a Routing for auto tag.

Parameters

Name Type Description
areas* array List of area ID
content* string Content of keyword
type* string Can be any of “From”, “To”, “Subject” or “Subject or text”
tag* string Tag name

* Field must exist during creation.

Response

{
   "id": 6,
   "areas": [1,2,3],
   "content": "account",
   "type": "Subject or text",
   "tag": "tag-name"
}

Update a Routing for auto tag

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

Updates a Routing for auto tag

Parameters

Refer to Create Routing for auto tag’s parameters table.

Response

{
   "id": 6,
   "areas": [1,3],
   "content": "faulty",
   "tag": "tag-name"
   "type": "Subject or text",
}

Delete a Routing for auto tag

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

No parameter

Response

Deletes a Routing for auto tag.

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

Create a Routing for SIP

POST https://api.cention.com/s/:workspace/v1/routing/sip

Creates a Routing for SIP.

Parameters

Name Type Description
areas* array List of area ID
route_sip_id* string SIP ID

* Field must exist during creation.

Response

{
   "id": 2,
   "areas": [1,2,3],
   "route_sip_id": "123456"
}

Update a Routing for SIP

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

Updates a Routing for SIP

Parameters

Refer to Create Routing for SIP’s parameters table.

Response

{
   "id": 2,
   "areas": [1,3],
   "route_sip_id": "123456"
}

Delete a Routing for SIP

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

No parameter

Response

Deletes a Routing for SIP.

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

Create a Tag

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

Creates a Tag.

Parameters

Name Type Description
areas* array List of area ID
tag_color string Tag color for VIP tag
tag_delete bool Is a delete tag
tag_name* string Tag name
tag_vip bool Is a VIP tag
parent_tag string Parent tag e.g. “TagLv1 / TagLv2”
sub_tag string Sub tag e.g. TagLv3

* Field must exist during creation.

Response

{
   "id": 37,
   "tag_id": 22,
   "areas": [1,2,3],
   "tag_delete": false,
   "tag_name": "tagLv1"
}

Update a Tag

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

Updates a Tag

Parameters

Refer to Create a Tag’s parameters table.

Response

{
   "id": 38,
   "tag_id": 23,
   "areas": [1,2,3],
   "parent_tag": "tagLv1",
   "tag_name": "tagLv2"
}

Delete a Tag

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

No parameter

Response

Deletes a Tag.

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