Skip to main content

Voicelogs API

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.

HTTP Request​

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.

ParameterTypeRequiredDescriptionExample Value
campaignIdIntegerYesThe ID of the campaign the voice log belongs to.110
crtObjectIdStringYesCall 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
targetFormatStringYesThe desired output file format for the voice log.mp3
filtersStringYesAn object containing specific metadata (like the callId) used for verification. The value must be URL encoded.{callId:d741-6904fad1-vcall-10989826}

Example Request​

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: <your-session-id>'

Example Response (200 OK)​

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

Status CodeDescription
200The 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.