×

Login API

Session ID authentication is a secure, session-based mechanism that allows a user or system to access Contact Center APIs after a successful login.

When a user logs in through the authentication API, the system generates a Session ID token that uniquely represents that user’s authenticated state. This Session ID must be passed with subsequent API requests until the session expires or the user logs out.


How it works

Login:
The client application calls the login API with valid user credentials and configuration parameters.
The server responds with a SessionId token.

Use Session ID:
For every subsequent API request, the Session ID is included — either in the request header (recommended) or as part of the authentication field in the payload, depending on the API design.

Session Lifecycle:

  • Each Session ID is time-bound and user-specific.
  • A session automatically expires after a configured timeout or explicit logout.
  • On expiry, the client must request a new Session ID via the login API.
POST

<Protocol>://<IP_Domain_Name>:<port>/ameyorestapi/session/userLogin

The following are the POST parameters sent as raw in the Body of the Request:

Parameter Name Type Description
userId string The user’s login ID for the Contact Center dashboard. This uniquely identifies the user within the system.
token string The user’s password or access key associated with the login ID. Used to authenticate the login request.
forceLogin boolean If set to true, the system allows the user to log in even if an active session already exists (used for session recovery or multi-terminal logins).
terminalInfo string Metadata describing the terminal, browser, or device initiating the login (e.g., "Agent Desktop", "Chrome", "WebSDK").
curl --location 'https://cxdemo.ameyo.com:8443/ameyorestapi/session/userLogin' \
--header 'Content-Type: application/json' \
--data '{
"token": "doc_admin",
"userId": "doc_admin",
"forceLogin": true,
"terminalInfo": "test"
}'
{
"userId": "doc_admin",
"terminalInfo": "0.0.0.0",
"sessionId": "d898-690087a3-ses-doc_admin-IYsFDHJigglOzkBdCeNlj8rawGs59rlXT4Y1itYNVETkUAvcQk3JBpDQTA7I5JvQqdL71TOz4h7nRIfKGFbrVlST15rsMfCrNyIpuil3TuY8u8Sggj3k-1373",
"loginTime": 1762734209072,
"userType": "Administrator",
"contactCenterId": 1,
"userName": "doc_admin",
"lastLoginInfo": {
"userId": "doc_admin",
"userName": "doc_admin",
"lastLoginTime": 1762708324129,
"lastLogoutTime": 1762708504129,
"sessionId": "d898-690087a3-ses-doc_admin-v9Z96DIMkpg7xeAuMLTJFTxGzvVmRQMr2RkEsv0dei6tRbjjN9tmuZaCtMap77Ywwwg8eS68FQzuM8d2P1ccEiQpGMOharCwBdMuYGs5BJcOcru5uivR-1349",
"localIp": "0.0.0.0",
"publicIp": null,
"clientType": "java.ui.client",
"clientVersion": "1.0.0",
"browserInfo": null
},
"loginProperties": {},
"passwordStateDetail": {
"passwordValid": true,
"warnUser": false,
"shouldChangePassword": false,
"reason": null
}
}

HTTP Response:

  • On success, the HTTP response status code will be 200.

Create User API

The Create User API allows administrators to create new users in the Contact Center system programmatically.
This API is typically used to onboard agents, supervisors, or system users by defining their credentials, roles, and access configurations.

It helps automate user provisioning during setup, integration, or scaling of large contact center deployments, ensuring consistent configuration across environments.


Key Capabilities

  • Create a new user with required attributes such as user ID, name, contact center ID, and user type.
  • Define user roles and access levels (e.g., Agent, Supervisor, Administrator).
  • Configure optional parameters like default ready state, login policy, and mapping IDs.
  • Add metadata such as description or mapping with an external CRM or system user.
  • Returns a confirmation with the newly created user’s unique identifier.
POST

<Protocol>://<IP_Domain_Name>:<port>/ameyorestapi/cc/contactCenterUsers

The following are the POST parameters sent as raw in the Body of the Request:

 

Parameter Name

Type Description
userId

string

Unique user identifier in CC. This is what you’ll later use to map to external systems.
userType string Business role of the user e.g. Agent, Supervisor, Executive, Professional Agent. 
userName string Display name of the user.
systemUserType string System-level type, often same as userType.
defaultReady boolean Whether the agent should log in as “Ready” by default.
userData string Extra data / notes.
contactCenterId integer CC id in which to create this user.
description string Free-text description.
loginPolicy string e.g. disallow.after.limit or verify.before.force.login.
maxAllowedLogins string Max concurrent logins. Store as string for backward compatibility (as per your schema).
mappingUserId string Mapping to external app login (email/SSO id).
curl --location 'https://cxdemo.ameyo.com:8443/ameyorestapi/cc/contactCenterUsers' \
--header 'sessionId: d898-690087a3-ses-doc_admin-cjtO7ersOpDcT0egpwJYV0nbktd2nVMtgiY2NaiWyeBtjO6E4yqlAJaQ7EpHm64a0f4slzAqjozcdByHxTgH8H39UGJnQNmcATGzJTAD6G0DQrXOFgpB-1339' \
--header 'Content-Type: application/json' \
--header 'Cookie: __METADATA__=b84809ab-9449-4ccb-86c0-2fcc0e21440f' \
--data-raw '{
"userId": "abcd",
"userType": "Supervisor",
"userName": "Sharanya Pathikonda",
"contactCenterId": 1,
"userData": "password",
"defaultReady": true,
"systemUserType": "Supervisor",
"loginPolicy": "verify.before.force.login",
"maxAllowedLogins": "1",
"mappingUserId": "testuser@gamil.com",
"description": "test user"
}'
{  "ccUserId": 364, 
 "userId": "tesUser", 
 "userType": "Supervisor", 
 "skillLevelIds": [], 
 "skillIds": null, 
 "userName": "tesUser", 
 "systemUserType": "Supervisor",  "privilegePlanId": 13,  "defaultReady": false, 
 "maskedPrivileges": null, 
 "maxAllowedLogins": null, 
 "loginPolicy": null, 
 "mappingUserId": null

}

HTTP Response:

  • On success, the HTTP response status code will be 200.

Update User API

The Update User API allows administrators to modify an existing user’s details within the Contact Center.
It supports updating user information such as name, type, credentials, login policy, and mapping details — helping maintain accurate and up-to-date user configurations across the system.

This API is typically used when a user changes role, name, or login policy, or when credentials need to be reset programmatically.

Key Capabilities

  • Update existing user details, such as role, name, or contact center association.
  • Modify login policies, password, or allowed login configurations.
  • Map users to external systems like CRMs or workforce tools.
  • Enforce updates programmatically for large-scale user management.
PUT

<Protocol>://<IP_Domain_Name>:<port>/ameyorestapi/cc/contactCenterUsers/<userId>

Include the following parameters in your raw PUT request body when updating user details through this API:

Parameter Name Type Description
userId string Unique identifier of the user to be updated within the Contact Center.
userType string Defines the user’s access type (e.g., Agent, Supervisor, Analyst). Determines feature and role-based permissions.
userName string The display name of the user as it should appear in the Contact Center UI.
systemUserType string Specifies the internal system role for the user, aligned with Contact Center’s role management (e.g., Analyst, Supervisor).
defaultReady boolean If true, the user automatically moves to the “Ready” state upon login.
userData string The user’s password or credential data for authentication.
contactCenterId integer Unique ID of the Contact Center to which the user belongs.
loginPolicy string Defines the login behavior. Example: verify.before.force.login ensures validation before session override.
maxAllowedLogins integer Maximum number of concurrent sessions allowed for the user.
mappingUserId string External system mapping identifier (e.g., email or CRM user ID). Used for integrations with third-party systems.
curl --location --request PUT '<Protocol>://<IP_Domain_Name>:<port>/ameyorestapi/cc/contactCenterUsers' \
--header 'sessionId: <your-session-id>' \
--header 'Content-Type: application/json' \
--data-raw '{
"userId": "30994",
"userType": "Analyst",
"userName": "Srajan",
"systemUserType": "Analyst",
"defaultReady": true,
"userData": "password",
"contactCenterId": 1,
"loginPolicy": "verify.before.force.login",
"maxAllowedLogins": 1,
"mappingUserId": "testUser@gmail.com"
}'
{
"status": "success",
"message": "User updated successfully",
"userId": "30994",
"contactCenterId": 1,
"updatedFields": ["userName", "userType", "loginPolicy"]
}

HTTP Response:

  • On success, the HTTP response status code will be 200.

Delete User API

The Delete User API allows administrators to permanently remove an existing user from the Contact Center system.
This API is typically used to deprovision inactive agents, revoke access for users who have left the organization, or clean up test or duplicate accounts.

Once deleted, the user’s access credentials become invalid, and the user can no longer log in or be assigned to any queues, campaigns, or roles.

Key Capabilities

  • Delete an existing user from the Contact Center system.
  • Automatically revoke associated sessions and access credentials.
  • Useful for deprovisioning, account cleanup, and compliance management.
  • Requires a valid Session ID for authentication.
DELETE

<Protocol>://<IP_Domain_Name>:<port>/ameyorestapi/user/users/{userId}

Request Headers

Header Name                                                                            Description
sessionId Valid Session ID obtained from the Login API. Used to authenticate the delete request.
Content-Type (Optional) Indicates the media type of the request. Usually application/json.

Path Parameter

Parameter Name     Type                                                                            Description
userId     string Unique identifier of the user to be deleted from the Contact Center system.
curl --location --request DELETE '<Protocol>://<IP_Domain_Name>:<port>/ameyorestapi/user/users/abcd' \
--header 'sessionId: <your-session-id>'
{
"status": "success",
"message": "User deleted successfully",
"userId": "abcd"
}

Get Customer Callbacks

Description

Retrieve a paginated list of scheduled customer callback records for a specific campaign, using defined filters.

This API endpoint is typically used by supervisor or administrator applications to monitor, manage, and retrieve details of outstanding or past callbacks associated with a campaign.

Authentication

This API requires session-based authentication. A valid session token, typically generated upon a successful supervisor or administrative login, must be passed in the request header.

Query Parameters

The following parameters are passed directly in the URL query string to control filtering and pagination of the results.

Parameter Type Required Description Example Value
offset Integer Yes The starting index of the result set for pagination. Use 0 to start from the first record. 0
campaignId Integer Yes The unique identifier of the campaign for which callbacks are being retrieved. 110
limit Integer Yes The maximum number of callback records to return in the current request. 101

 

GET

<Protocol>://<IP_Domain_Name>:<port>/ameyorestapi/voice/customerCallbacks/getFiltered?offset=<Integer>&campaignId=<Integer>&limit=<Integer>

curl --location 'https://app3.ameyoemerge.in:8443/ameyorestapi/voice/customerCallbacks/getFiltered?offset=0&campaignId=110&limit=101' \
--header 'Sessionid: d741-6904fad1-ses-supervisor@exotel.in-Fw47aqwBM5asexKrtuH127yeq0w7hN6hUUOqT93bVqaxayEOF7d8cDT7EU45kdNNZiG1toUxaK8mHoMRreZF2FfX3KZtrqWaAwvH1f3K1BR9TIUyo79p-89189'

A successful request returns a JSON array containing the list of callbacks.

Field Type Description
customerCallbackId String The unique identifier for this specific callback instance.
campaignId Integer The ID of the campaign the callback is associated with.
phone String The customer's contact number for the callback.
callbackTime Long The scheduled time for the callback, represented as a Unix epoch timestamp in milliseconds.
dateAdded Long The timestamp (in milliseconds) when this callback record was created.
selfCallback Boolean Indicates if the callback was initiated by the customer (true) or scheduled internally (false).
userId String The ID of the agent it is assigned to or who scheduled it.
lastScheduledBy String The user ID of the last person/system that scheduled or modified the callback.
[
{
"customerCallbackId": "d741-6904fad1-cm-eEcdnIb3-50833",
"campaignId": 110,
"callbackTime": 1764410400000,
"selfCallback": true,
"userId": "Vinod",
"phone": "7905690272",
"customerId": -1,
"dateAdded": 1764324364764,
"maskedPhone": null,
"lastScheduledBy": "supervisor@exotel.in",
"actualCallbackTime": null,
"campaignName": null,
"phoneInfo": {
"phone": "7905690272",
"displayPhone": "7905690272",
"uniqueIdentifier": null
},
"groupIds": null,
"groupManagerIds": null
},
// ... other callback objects
]

Error Handling Notes

401 Unauthorized Error

The server returns a 401 Unauthorized response when the provided authentication token is invalid or missing. The primary cause is typically an expired or incorrect Sessionid passed in the request header. The response body will explicitly confirm the nature of the error.

Action: If you receive this error, the client must obtain a new Sessionid by performing a fresh login to the supervisor/administrator console and updating the token in the request header.

500 Internal Server Error (No Data Found)

The system may incorrectly return a 500 Internal Server Error in a specific edge case where the request is logically successful but no data is found (i.e., zero callbacks match the provided campaignId, offset, and limit). Instead of the expected 200 OK with an empty array [], the server returns a 500 status.

Action: Developers should be prepared to handle a 500 error as a success case indicating an empty result set when the request URL and headers are otherwise valid. This behavior is considered an API bug but must be accounted for in client-side error logic to prevent false negative failures. If the 500 error occurs with valid input, it indicates that no records are available for the given filter criteria.

 

{
"message": "invalid.authentication.token:d741-6904fad1-ses-supervisor@exotel.in-Fw47aqwBM5asexKrtuH127yeq0w7hN6hUUOqT93bVqaxayEOF7d8cDT7EU45kdNNZiG1toUxaK8mHoMRreZF2FfX3KZtrqWaAwvH1f3K1BR9TIUyo79p-89189",
"info": null,
"status": 401,
"errorCode": 70201
}

Delete Customer Callback

Description

Delete a single scheduled customer callback record using its unique identifier.

This API endpoint is used by supervisor or administrative applications to permanently remove an unwanted or completed callback from the system queue.

DELETE

<Protocol>://<IP_Domain_Name>:<port>/ameyorestapi/voice/customerCallbacks/{customerCallbackId}

Authentication

This API requires session-based authentication. A valid session token, generated upon successful supervisor or administrator login, must be passed in the request header.

Path Parameters

Parameter Type Required Description Example Value
customerCallbackId String Yes The unique identifier of the callback record to be deleted. d741-6904fad1-cm-eEcdnIb3-50833
 
DELETE 'https://app3.ameyoemerge.in:8443/ameyorestapi/voice/customerCallbacks/d741-6904fad1-cm-eEcdnIb3-50833' \
--header 'sessionId: d741-6904fad1-ses-supervisor@exotel.in-DRjkyVX072gjShbiytGyb4d5pzwGGIWcJGA5AJeLaQWwYcf0pCWpLdMOapOCmKdVnNlr3vI64hURQt5Wr05OP1671bVtq7rPttDvedBzCEYvJXrl8E5Q-89219'

Example Response (200 OK)

A successful deletion returns a minimal response, indicating the operation was executed correctly.

Status Code Description
200 The request was successful, and the callback record has been deleted.

Successful Response Body

The response body will be the simple string "ok" (not a JSON object).

401 Unauthorized

Returned when the provided sessionId is missing, expired, or invalid.

500 Internal Server Error

Returned for an unexpected server-side issue. This can also occur if the system fails to interact with the database to execute the deletion.


Voicelogs API

Description

Download a specific voice recording associated with a call interaction.

This API endpoint is typically used by supervisor or administrative applications to retrieve the audio file for quality monitoring or record-keeping purposes.

GET

<Protocol>://<IP_Domain_Name>:<port>/ameyorestapi/cc/downloadVoiceLog

Authentication

This API requires session-based authentication. A valid session token must be passed in the request header.

Query Parameters

The following parameters are passed directly in the URL query string to identify the file to be downloaded and the desired format.

Parameter Type Required Description Example Value
campaignId Integer Yes The ID of the campaign the voice log belongs to. 110
crtObjectId String Yes Call Run Time Object ID. The unique identifier generated during the call session used to locate the recorded audio file on the server. d741-6904fad1-vce-daf-638729
targetFormat String Yes The desired output file format for the voice log. mp3
filters String Yes An object containing specific metadata (like the callId) used for verification. The value must be URL encoded.

{callId%d741-6904fad1-vcall-10989826}

 

curl --location --globoff 'https://app3.ameyoemerge.in:8443/ameyorestapi/cc/downloadVoiceLog?campaignId=110&crtObjectId=d741-6904fad1-vce-daf-638729&targetFormat=mp3&filters={callId%d741-6904fad1-vcall-10989826}' \
--header 'Sessionid: d741-6904fad1-ses-supervisor@exotel.in-w1pQnDRa9KNCQAXJrVhdxHXZcSCGQszWe24UWiNYBIFHAdwV6IYC9WHFblvWcvQsnyNvf6NYgOsqqVvdvUVruTHJWz9sOJbKpXybsRTHxNxELuCA1Gj8-96338'

Example Response (200 OK)

A successful request streams the raw audio file data directly to the client.

Status Code Description
200 The request was successful. The response body contains the audio data (e.g., MP3).

Successful Response Body

The successful 200 OK response for the downloadVoiceLog endpoint returns raw binary data, not a text-based format like JSON or XML.

It is critical that your HTTP client or library is configured to treat the response as a byte stream to prevent file corruption.

Key Implementation Requirements:

  • Binary Stream Processing: You must process the response body as a stream of bytes. Do not attempt to read the response into a standard string variable or pass it to a text/JSON parser.

  • Saving the File: Use the appropriate file I/O methods in your programming language to write the entire raw byte stream directly to a local file (e.g., recording.mp3).

  • File Extension/Context: Always check the Content-Type response header (e.g., audio/mpeg for MP3) provided by the server to confirm the file format and ensure you save it with the correct extension.

This approach ensures the downloaded voice log file is playable.

Error Responses

401 Unauthorized

Returned when the provided Sessionid is missing, expired, or invalid.

404 Not Found

Returned if the file identified by the combination of crtObjectId and campaignId cannot be located on the server.

500 Internal Server Error

Returned for an unexpected server-side issue, such as a database error or failure to read the file from storage.