API Reference
Build powerful integrations with Cention's RESTful APIs.
API Overview
Cention provides a comprehensive set of APIs to integrate with your applications. All APIs use REST conventions with JSON payloads.
apid.cention.com/s/{workspace}
JWT Token / HMAC-SHA256
JSON
1.0.0
Quick Start
curl -X POST "apid.cention.com/s/{workspace}/capi/json/c3_new_errands" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"
Available APIs
Choose the API that fits your integration needs
Errand API
Create, read, update, and close errands (tickets). Manage customer conversations programmatically.
POST /capi/json/c3_new_errands
POST /capi/json/c3_end_errands
POST /capi/json/c3_answer_errands
GET /c3_errand_reports
Agent API
Manage agents in your contact center. Create, modify, and delete agent accounts.
POST /v1/agent
GET /v1/agent
PUT /v1/agent/{id}
DELETE /v1/agent/{id}
Chat API
Build custom chat clients. Real-time messaging between customers and agents.
GET /socket/external.api/canchat
GET /socket/external.api/status
POST /socket/external.api/createerrand
POST /socket/external.api/chatrating
Bot API
Integrate chatbots with Cention. Register bots, send messages, and handle conversations.
POST /bot/register
POST /bot/message
POST /bot/transfer
POST /bot/close
Library API
Access the knowledge base. Retrieve libraries, categories, and FAQ content.
GET /c3_libraries
GET /c3_library_categories
GET /c3_library_questions
GET /c3_library_attachments/{id}
Export API
Trigger and manage data exports. Download errand data, reports, and analytics.
POST /c3_trigger_exports
Bot API Documentation
Integrate your chatbot with Cention Contact Center
Bot API Endpoints
The Bot API allows you to integrate chatbots with Cention Contact Center. Available endpoints:
POST /bot.api/{command}
POST /api/bot/register
POST /api/bot/deregister
POST /api/bot/message
POST /api/bot/close
POST /api/bot/comment
POST /api/bot/watemplate
Register Bot
Register a new bot with the Cention platform to start handling conversations.
Authentication
Uses JWT authentication. Create tokens in Cention server → Administration → API → Access Tokens.
Deregister Bot
Remove a bot registration from the Cention platform.
Send Message
Send a message from the bot to a customer in an active conversation.
Message Types
Supports text messages, buttons, cards, and rich media attachments.
Close Chat
Close an active chat conversation handled by the bot.
Add Comment
Add an internal comment to a conversation for agent reference.
Send WhatsApp Template
Send a WhatsApp template message through the bot.
Note
WhatsApp templates must be pre-approved by WhatsApp Business API.
Authentication
The Bot API uses JWT (JSON Web Token) authentication.
Creating JWT Tokens
- Go to Cention server → Administration tab
- Navigate to API → Access Tokens
- Select the channel and account/area
- Fill in the Key field
- Save to generate token
Using the Token
Authorization: Bearer YOUR_JWT_TOKEN
Errand API Documentation
Manage customer conversations and tickets
apid.cention.com/s/{workspace}Authentication: JWT Token (see Cention API Authentication section)
Create New Errand
Create a new errand (ticket) in the system. Errands represent customer conversations across all channels.
Use Cases
- Create tickets from external systems
- Import historical conversations
- Integrate with third-party platforms
Close Errand
Close an active errand when the customer issue has been resolved.
Send Reply to Errand
Send a reply message to an existing errand. This adds a new message to the conversation thread.
Find Errand by Phone
Search for errands associated with a specific phone number and agent.
Errand Reports
Retrieve errand reports and track changes to errands over time.
GET /c3_errand_reports/{id} - Get specific errand report
PUT /c3_errand_reports/{id} - Mark errand as changed
GET /c3_errand_reports - Get changed errand reports
GET /c3_dirty_errand_list - Get dirty errand list
POST /c3_dirty_errand_list - Mark errands as changed
GET /c3_errand_lookup - Lookup errand by phone, agent, and time
Agent API Documentation
Manage agents, groups, and statuses
apid.cention.com/s/{workspace}Authentication: HMAC-SHA256 (see Agent API Authentication section)
Agent Management
Create, update, and manage agent accounts in your contact center.
POST /v1/agent - Create an agent
GET /v1/agent - List all agents
PUT /v1/agent/{id} - Update an agent
DELETE /v1/agent/{id} - Delete an agent
Agent Access Keys
Manage API access keys for agents to authenticate API requests.
POST /v1/agent/{id}/access-key - Create access key
DELETE /v1/agent/{id}/access-key/{access_key_id} - Revoke access key
Agent Groups
Organize agents into groups for routing and management purposes.
POST /v1/agent-group - Create agent group
PUT /v1/agent-group/{id} - Update agent group
DELETE /v1/agent-group/{id} - Delete agent group
POST /v1/agent-group/{id}/add-agent - Add agent to group
POST /v1/agent-group/{id}/remove-agent - Remove agent from group
Agent Status
Monitor and update agent availability statuses (Available, Busy, Away, etc.).
GET /v1/agent-status - List all agent statuses
PUT /v1/agent-status/{id} - Update agent status
POST /v1/agent-status/{id}/set-status - Set agent status
HMAC-SHA256 Authentication
The Agent API uses HMAC-SHA256 for secure authentication.
Authorization Header
Authorization: CENTION1-HMAC-SHA256 <access-key-id>,<signature>
Signature Calculation
Use HMAC SHA256 with the following format:
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 ordered by field key ascending alphanumerically.
Array data uses comma separator: 1,2,3
Chat API Documentation
Build custom chat clients and integrations
Library: CentionChatAPI.js
Compatibility: Cention Contact Center 4.4+
Chat API Overview
The Cention Chat API allows you to build custom chat clients for Cention Contact Center. The API is provided through the CentionChatAPI.js library which handles all communication with the Cention chat server.
Dependencies
- socket.js
- sockwrap.js
Setup Requirements
- Set
FOR_THIRD_PARTY_USEto true in CentionChatAPI.js - Serve the required JS files from your web server
- Register your domain with Cention support (support@cention.com)
Chat API Endpoints
Available endpoints for chat functionality:
GET /socket/external.api/savehistory - Save chat history
GET /socket/external.api/printhistory - Print chat history
GET /socket/external.api/canchat - Check chat availability
GET /socket/external.api/status - Get chat status
GET /socket/external.api/agentlist - Get agent list
GET /socket/external.api/isChatOpen - Check if chat is open
GET /socket/external.api/chattemplate - Get chat template
POST /socket/external.api/createerrand - Create errand from chat
POST /socket/external.api/chatrating - Submit chat rating
POST /socket/external.api/agentchatrating - Submit agent chat rating
POST /socket/external.api/activeagent - Get active agent count
GET /socket/external.api/canresume - Check if chat can resume
Chat Widget
Embed a chat interface directly into your web pages. Users can chat with agents while browsing your website, with conversations persisting across page navigation.
Requirements
- jQuery library
- CORS whitelist configuration in Cention Contact Center
- Basic HTML/JavaScript knowledge
Basic Implementation
<script src="{baseUrl}/cention/chat/js/jquery.min.js"></script>
<script>var CentionBaseURL = "{baseUrl}";</script>
<script src="{baseUrl}/cention/chat/js/widget.js"></script>
<div id="cention-chat-container"></div>
<script>
if(typeof CentionChat !== "undefined") {
CentionChat("cention-chat-container", { areaId: 1 });
}
</script>
Replace {baseUrl} with your Cention Contact Center URL (e.g., https://cloud.cention.com/s/demo)
Widget Endpoints
GET /cention/chat/js/widget.js - Get chat widget script
GET /cention/chat/js/jquery.min.js - Get jQuery library
WebSocket Chat API
Real-time WebSocket API for bidirectional chat communication. Provides instant message delivery and presence updates.
Library API Documentation
Access knowledge base content and FAQs
apid.cention.com/s/{workspace}Authentication: JWT Token
Libraries
Access and manage knowledge base libraries containing organized content for customer support.
GET /c3_libraries - Get all libraries
GET /c3_libraries/{id} - Get single library
GET /c3_external_libraries - Get all external libraries
GET /c3_external_libraries/{id} - Get single external library
Categories
Organize library content into categories for easier navigation and management.
GET /c3_library_categories - Get all categories
GET /c3_library_categories/{id} - Get single category
Questions & Answers
Retrieve FAQ questions and answers from the knowledge base.
GET /c3_library_questions - Get all questions
GET /c3_library_questions/{id} - Get single question
Attachments
Access files and documents attached to library content.
GET /c3_library_attachments/{id} - Get single attachment
FAQ Widget
Embed knowledge base content directly in your web pages with the FAQ Widget.
GET /faq/widget/config - Get FAQ widget configuration
GET /cention/chat/faqWidgetConfig - Get FAQ widget config by area
GET /cention/chat/faqWidgetConfigWidgetId - Get FAQ widget config by widget ID
Export API Documentation
Generate and download data exports
apid.cention.com/s/{workspace}Authentication: JWT Token
Trigger Export Generation
Trigger the generation of data exports for errands, reports, and analytics. The export process runs asynchronously and generates downloadable files.
Export Types
- Errand data exports
- Report exports
- Analytics data
- Custom filtered exports
Workflow
- Submit export request with filters and parameters
- Receive export job ID
- Poll for export completion status
- Download generated export file
Supported Export Formats
Exports can be generated in multiple formats to suit your integration needs:
- CSV - Comma-separated values for spreadsheet applications
- JSON - Structured data for programmatic processing
- Excel - Microsoft Excel format with formatting
- PDF - Formatted reports for sharing and archiving
Additional API Resources
More specialized APIs for advanced integrations
Area API
Manage areas (workspaces) in your contact center. Create, update, and delete areas for organizing teams and channels.
POST /v1/area
GET /v1/area
PUT /v1/area/{id}
DELETE /v1/area/{id}
Organization API
Manage organizations and organizational hierarchies within your contact center platform.
POST /v1/org
PUT /v1/org/{id}
DELETE /v1/org/{id}
Routing API
Configure routing rules including keywords, auto-tags, and SIP routing for intelligent errand distribution.
POST /v1/routing/keywords
POST /v1/routing/autotags
POST /v1/routing/sip
Tag API
Create and manage tags for categorizing and organizing errands, contacts, and other resources.
POST /v1/tag
GET /v1/tag
PUT /v1/tag/{id}
DELETE /v1/tag/{id}
Contact Cards API
Manage customer contact information and custom fields for enhanced customer profiling.
POST /capi/json/c3_contact_cards
Logio API
Track agent login and logout activity for attendance monitoring and reporting.
GET /capi/custom/logio
GET /custom/logio
Cention API Authentication
The main Cention API uses JWT (JSON Web Token) authentication. Include your token in the Authorization header.
Creating JWT Tokens
- Go to Cention server → Administration tab
- Navigate to API → Access Tokens
- Select the channel and account/area
- Fill in the Key field
- Save to generate token
Authorization: Bearer YOUR_JWT_TOKEN
fetch('apid.cention.com/s/{workspace}/capi/json/c3_new_errands', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_JWT_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
// errand data
})
});
Webhooks & Callbacks
Receive real-time notifications when events occur
errand.created
Fired when a new errand is created
errand.updated
Fired when an errand is modified
errand.closed
Fired when an errand is closed
chat.started
Fired when a new chat begins
chat.message
Fired when a message is sent
chat.ended
Fired when a chat session ends
Ready to Build?
Get your JWT token and start integrating Cention with your applications.