Skip to content

Search Call Log by Unit

Endpoint used to search call logs by unit.

Terminal window
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v1/voice/call-logs/search/{unityId} \
--header 'Authorization: Bearer TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"search": "<string>",
"operator": "<string>",
"date": "<string>",
"startDate": "<string>",
"endDate": "<string>",
"nDays": 123
},
"pagination": {
"page": 123,
"pageSize": 123
},
"orderBy": {
"column": "<string>",
"direction": "<string>"
}
}
'
{
"message": "<string>",
"items": [
{
"message": "<string>",
"id": "<string>",
"callId": "<string>",
"callName": "<string>",
"unityId": "<string>",
"successEvaluation": true,
"botId": "<string>",
"audioFileUrl": "<string>",
"agentRecordingUrl": "<string>",
"userRecordingUrl": "<string>",
"endCallType": "<string>",
"callType": "<string>",
"dateFormatted": "<string>",
"costBreakdown": {},
"duration": 123,
"phone": "<string>",
"callDate": "<string>",
"dataStructure": {},
"durationFormatted": "<string>",
"transcription": [
{}
],
"metadata": {},
"callTime": "<string>",
"totalCost": 123,
"summary": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"pagination": {
"currentPage": 123,
"hasNextPage": true,
"hasPreviousPage": true,
"pageSize": 123,
"totalItems": 123,
"totalPages": 123
}
}

ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
ParameterTypeDescriptionRequired
unityIdUUIDUnit identifier.Yes
ParameterTypeDescriptionRequired
filtersObjectObject containing search and filtering criteria.No
filters.searchStringTerm for textual search (e.g., agent name or title).No
filters.operatorStringLogical operator for the search (e.g., all_time).No
filters.dateStringFixed or relative date filter.No
filters.startDateStringStart date for period filter (ISO 8601).No
filters.endDateStringEnd date for period filter (ISO 8601).No
filters.nDaysNumberFilter for records from the last “N” days.No
paginationObjectObject for result pagination control.Yes
pagination.pageNumberPage number to retrieve (default 1).Yes
pagination.pageSizeNumberAmount of records returned per page (default: 10).Yes
orderByObjectObject to define the sorting rule.No
orderBy.columnStringColumn/field name to base the sort on (default: createdAt).Yes
orderBy.directionStringSort direction: ASC (ascending) or DESC (descending) (default: DESC).No
KeyTypeDescription
messageStringGlobal status message of the operation.
itemsArrayList containing detailed logs of calls/interactions.
items[].idUUIDUnique identifier of the history record.
items[].callIdStringIdentifier of the call at the telephony or voice provider.
items[].callNameStringIdentification name or title assigned to the interaction.
items[].unityIdUUIDIdentifier of the organizational unit where the call occurred.
items[].botIdUUIDIdentifier of the Agent that performed the service.
items[].successEvaluationBooleanIndicates if the interaction was evaluated as successful.
items[].audioFileUrlURLLink to the complete audio file of the interaction.
items[].agentRecordingUrlURLLink to the exclusive recording of the Agent channel.
items[].userRecordingUrlURLLink to the exclusive recording of the User channel.
items[].endCallTypeStringReason for termination (e.g., CONVERTED, NO_ANSWER, ENDED).
items[].callTypeStringInteraction type (e.g., web, phone).
items[].durationNumberTotal duration of the interaction in seconds.
items[].durationFormattedStringDuration formatted for human reading (e.g., 02:15).
items[].phoneStringSource or destination phone number.
items[].callDateStringExact date and time of the start of the interaction.
items[].transcriptionArrayList of objects containing speech converted to text.
items[].totalCostNumberTotal financial cost processed for the call.
items[].summaryStringExecutive summary generated by IA about the conversation content.
paginationObjectMetadata for navigation control between pages.
pagination.currentPageNumberIndex of the current page returned.
pagination.pageSizeNumberAmount of items per page.
pagination.totalItemsNumberAbsolute total of records found in the database.
pagination.totalPagesNumberTotal amount of pages available for query.

To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.

To access your access token, follow these steps:

  1. Log in to the ToolzzAI platform
  2. Click on “Settings”
  3. Click on “Access Token”
  4. Copy the access token

Access token page