×

Generating a token for authentication

POST

https://<IP_Domain_Name>:<port>/configuration/basicauth

accept :    application/json

Authorization : Bearer eyJhbGciOiJSUzUxMiJ9.eyJpc3MiOiJh  

Content-Type : application/json

{

“username”: “customer_manager”, 

“password”: “customer_manager@123”, 

“context”: “ContactCenter”, 

“contextId”: “1”, 

“dateExpiry”: “2030-05-19T12:20:57.310Z”,  

“userRole”: “Administrator”

 }

Parameter Type Description
username String Required. The unique identifier for the user account that is making the API request. This user must have the appropriate permissions to perform the requested actions.
password String Required. The authentication password associated with the provided username. For security, it is highly recommended to transmit this credential over HTTPS.
context String Required. Defines the specific application or service module the API call is intended for. For all contact center operations, this value should be set to "ContactCenter".
contextId String Required. The unique ID of the specific contact center instance or tenant you are targeting. This ensures the request is routed to the correct environment.
dateExpiry String Optional. The ISO 8601 timestamp that specifies the exact date and time when the session or token for this request will expire. If not provided, a default session timeout will apply. <ToBeChecked> Example: "2030-05-19T12:20:57.310Z"
userRole String Required. Defines the permission level of the user making the request. This determines which actions the user is authorized to perform. Example roles include "Administrator".

Introduction to Contact Management

Usecases

This integration allows applications (like a CRM etc) to directly control the contact center customer management. 

Here’s what your system will be able to do automatically:

  • Automated Calling Lists: The CRM application can directly send lists of customers to  dialer for calling campaigns, without needing manual uploads.
  • Leverage Ameyo's Dialing Rules: CRM application can use Ameyo's built-in dialing intelligence, like setting rules for the maximum number of times to try calling an unanswered number.

Purpose

This document is a simple guide for  IT and operations teams. It explains exactly how we will connect applications like CRM with the contact center platform. The goal is to make the two systems work together as one seamless solution for your agents and customers.


Upload Contacts via CSV

This API enables the simultaneous uploading of lead information for multiple customers, streamlining the process of managing bulk customer data.

POST

https:///<IP_Domain_Name>:<port>/v1/cc-list/1/process-list/13/leads/17/contact-upload-tasks

Headers

The headers provide metadata for the request, including authentication and content type.

Header Value Description
accept */* The client accepts any type of response format.
authorization Basic <base64_encoded_token> The authentication credentials. The token is a Base64 encoding of username:password.
content-type multipart/form-data; boundary=... Indicates that the request body contains multiple parts (like a file and text fields), separated by the specified boundary string.
origin https://<IP_Domain_Name> The origin domain making the request, typically used for CORS (Cross-Origin Resource Sharing) validation.

Parameters

These are the data fields sent in the request body as multipart/form-data.

Parameter Type Value (Example) Description
file File contacts.csv Required. The CSV file containing the list of leads to be uploaded.
user_id String john Required. The userID of the supervisor or user who is initiating the upload task.
update_duplicate Boolean false If set to true, existing contacts with the same unique identifier will be updated. If false, duplicates will be ignored.
churn_updated_records Boolean false If set to true, any records that are updated will be marked as "churned" or reset for dialing.
migrate Boolean false If set to true, this will trigger a migration process for the exisitng contacts to the specified leadlist mentioned in the endpoint
header_mapping JSON {"twitter":"", "timezone":"", "facebook":"", "phone2":"", "name":"customer_name", "phone3":"", "phone4":"", "phone5":"", "email":"", "phone1":"phone1"} Required. A JSON object that maps the column headers in your CSV file (value) to the corresponding fields in the Ameyo system (key).
 

{
“twitter”: “”,
“timezone”: “”,
“facebook”: “”,
“phone2”: “”,
“name”: “customer_name”,
“phone3”: “”,
“phone4”: “”,
“phone5”: “”,
“email”: “”,
“phone1”: “phone1”
}

{
“metadata”: null,
“method”: “POST”,
“response”: [
{
“data”: {
“task_id”: 4231888909951751
},
“http_code”: 200,
“error_data”: null
}
],
“http_code”: 200,
“request_id”: null
}


Retrieve error CSV for uploaded contacts

If you've ever uploaded a big list of contacts and some of them failed, this tool is for you. It lets you download a simple CSV file that shows only the contacts that had errors and tells you why they failed. This way, you can quickly fix the issues in your list and re-upload it without having to guess what went wrong.

This is a GET request, which means you are retrieving information from the system. You will need to provide the unique IDs for your contact center, the specific campaign (process), the list, and the upload task to get the right error file.

GET <your_domain>/cc-list/{ccId}/process-list/{processId}/leads/{leadId}/contact-upload-tasks/{taskId}/error-file

These are the specific IDs you need to include in the URL to tell the system exactly which error file you want to download.

Parameter What it Means Example
ccId Contact Center ID: The unique ID for your entire contact center. 1
processId Process ID: The ID for the specific campaign or process you uploaded the list to. 1
leadId List ID: The ID for the contact list within that campaign. 1
taskId Upload Task ID: The unique ID generated for your specific file upload. You get this ID when you first upload the file. 1

curl -X ‘GET’ \
‘https://<domain>/cc-list/1/process-list/1/leads/1/contact-upload-tasks/1/error-file’ \
-H ‘accept: */*’ \
-H ‘authorization: Basic <Your_Base64_Encoded_Token>’


Agent Presence API’s

The User Monitoring API provides real-time data about agents in the Contact Center. It allows tracking of agent presence, current state (e.g., Ready, On Call, Wrap-up), and the campaign or queue they are handling.

This API is useful for dashboards, monitoring tools, and operational reporting. It helps supervisors understand agent activity, manage workloads, and optimize performance. Responses include live metrics such as active interactions and agent engagement details.

Data is returned in JSON format, supporting filtering and pagination for efficient retrieval in large contact centers.

GET

https://{DataEngine_Domain_Name}:<port>/v4/cc-list/{ccId}/monitoring/user-session-information

Header Value Description
accept application/json The client accepts json type of response format.
authorization Basic <base64_encoded_token> The authentication credentials. The token is a Base64 encoding of username:password.
Name Type Description Default / Values
cc-id integer (int32) Unique ID of the contact center Required
table-name string Monitoring table name Required Available values: user-runtime-information, user-session-information, chat-information, customer-information
offset integer Zero-based offset of the first entry included in this page Default: 0
limit integer Number of results to be returned Default: 100
sort_by array[string] Sorting criteria in the format `property:asc desc`. Multiple criteria supported
campaign-ids array[integer] Campaign IDs search filter -
user-ids array[string] User IDs search filter -
user-name string User name search filter -
status array[string] User and contact connection status search filter Available values:Inactive, ringing ,connected,hungup
queue-ids array[integer] Queue IDs search filter -
user-types array[string] User types search filter -
session-ids array[string] Session IDs search filter -
call-ids array[string] Call IDs search filter -
chat-ids array[string] Chat IDs search filter -

{
“http_code”: 200,
“method”: “GET”,
“request_id”: “f3217095-eddc-4ae8-a558-e4db0baef684”,
“response”: [
{
“data”: {
“contact_center_id”: 6,
“user_id”: “sachin_exe2”,
“user_name”: “sachin_exe2”,
“user_status”: “Ready”,
“user_status_duration”: null,
“service_info”: {
“instance_id”: null,
“sip_trunk_id”: null,
“grpc_callback_url”: null
},
“campaign_id”: 389,
“campaign_name”: “monika_webchat”,
“queue_id”: null,
“queue_name”: null,
“interaction_id”: “sachin_exe2_389”,
“channel_details”: {
“channel_type”: “VOICE”,
“addition_details”: {}
},
“customer_status”: null,
“customer_status_duration”: null,
“customer_details”: {
“id”: null,
“name”: null,
“phone_info”: {
“phone”: null,
“display_phone”: null,
“unique_identifier”: null
},
“crt_object_id”: null,
“addition_details”: {}
},
“waiting”: false
}
}
],
“metadata”: {
“total”: 1,
“count”: 1,
“offset”: 0,
“limit”: 100
}
}

Code Description Media Type Example Response
200 Monitoring data returned successfully. application/json json { "http_code": 200, "method": "GET", "request_id": "6da10c2e-1ef7-4206-98ce-410087c9a151", "response": [ { "data": "string" } ], "metadata": { "total": 1000, "count": 50, "offset": 5, "limit": 50 } }
400 Bad Request. application/json json { "statusCode": 400, "status": "Bad Request", "errorCode": "CONF-1001", "errorMessage": "Invalid input or malformed request." }
401 Unauthorized — missing or invalid credentials. application/json json { "statusCode": 401, "status": "Unauthorized", "errorCode": "CONF-1002", "errorMessage": "Authentication token is missing or invalid." }
403 Forbidden — user not permitted to access this resource. application/json json { "statusCode": 403, "status": "Forbidden", "errorCode": "CONF-1003", "errorMessage": "Access denied." }
404 Not Found — resource does not exist. application/json json { "statusCode": 404, "status": "Not Found", "errorCode": "CONF-1004", "errorMessage": "Object doesn't exist." }
500 Internal Server Error. application/json json { "statusCode": 500, "status": "Internal Server Error", "errorCode": "CONF-1005", "errorMessage": "An unexpected error occurred on the server." }