Customer Callbacks
Manage scheduled customer callback records for a campaign. All requests require a valid sessionId obtained from the Login API.
Get Customer Callbacks​
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 |
HTTP Request​
GET <Protocol>://<IP_Domain_Name>:<port>/ameyorestapi/voice/customerCallbacks/getFiltered?offset=<Integer>&campaignId=<Integer>&limit=<Integer>
Example Request​
curl --location 'https://app3.ameyoemerge.in:8443/ameyorestapi/voice/customerCallbacks/getFiltered?offset=0&campaignId=110&limit=101' \
--header 'SessionId: <your-session-id>'
Response Fields​
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. |
Example Response (200 OK)​
[
{
"customerCallbackId": "d741-6904fad1-cm-eEcdnIb3-50833",
"campaignId": 110,
"callbackTime": 17664104000000,
"selfCallback": true,
"userId": "Vinod",
"phone": "7905698272",
"customerId": -1,
"dateAdded": 17643243647640,
"maskedPhone": null,
"lastScheduledBy": "supervisor@exotel.in",
"actualCallbackTime": null,
"campaignName": null,
"displayPhone": "7905698272",
"uniqueIdentifier": null,
"groupIds": null,
"groupManagerIds": null
}
]
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.
{
"message": "Invalid.authentication.token:<session-id>",
"info": null,
"status": 401,
"errorCode": 70201
}
Delete Customer Callback​
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.
HTTP Request​
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 |
Example Request​
DELETE 'https://app3.ameyoemerge.in:8443/ameyorestapi/voice/customerCallbacks/d741-6904fad1-cm-eEcdnIb3-50833' \
--header 'sessionId: <your-session-id>'
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. |
The response body will be the simple string "ok" (not a JSON object).
Error Responses​
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.