> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt # GetACDHistory POST https://api.voximplant.com/platform_api/GetACDHistory Gets the ACD history. Allowed roles: `Owner`, `Admin`, `Developer`, `Supervisor`, `User manager`. **Example request:** Get the two ACD session history records from the 2012-01-01 00:00:00 to the 2014-04-01 00:00:00. Reference: https://docs.voximplant.ai/api-reference/management-api/reference/history/get-acd-history ## Authentication - `Authorization` header (bearer token, required) — Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the `Authorization` header as a Bearer value: ``` Authorization: Bearer $VOXIMPLANT_TOKEN ``` See [Authorization](/api-reference/management-api/authorization) for ready-to-copy snippets in bash, Python, Node.js and Go that turn your `credentials.json` into a token. ## Request ### Query parameters - `from_date` (string, required) — The UTC 'from' date filter in 24-h format: YYYY-MM-DD HH:mm:ss - `to_date` (string, required) — The UTC 'to' date filter in 24-h format: YYYY-MM-DD HH:mm:ss - `acd_session_history_id` (list of integer, optional) — The ACD session history ID list separated by semicolons (;) - `acd_request_id` (list of string, optional) — The ACD request ID list separated by semicolons (;) - `acd_queue_id` (list of integer, optional) — The ACD queue ID list to filter separated by semicolons (;) - `user_id` (list of integer, optional) — The user ID list to filter separated by semicolons (;) - `operator_hangup` (boolean, optional) — Whether to get the calls terminated by the operator - `unserviced` (boolean, optional) — Whether the call is unserviced by the operator - `min_waiting_time` (integer, optional) — The min waiting time filter - `rejected` (boolean, optional) — Whether the call is rejected calls by the 'max_queue_size', 'max_waiting_time' threshold - `with_events` (boolean, optional, default: false) — Whether to get the bound events - `with_header` (boolean, optional, default: true) — Whether to get a CSV file with the column names if the output=csv - `desc_order` (boolean, optional) — Whether to get records in the descent order - `count` (integer, optional, default: 20) — The max returning record count - `offset` (integer, optional, default: 0) — The first **N** records are skipped in the output - `output` (string, optional, default: json) — The output format. The following values available: **json**, **csv**, **xls**. The default value is **json** ## Response ### 200 Successful response - `result` (list of ACDSessionInfoType, optional) - `total_count` (integer, optional) — The total found ACD session count - `count` (integer, optional) — The returned ACD session count ## Types ### ACDSessionInfoType The [GetACDHistory] function result item. - `acd_session_history_id` (integer, optional) — The ACD session history ID - `acd_request_id` (string, optional) — The ACD request ID. See the [ACDRequest.id()](/api-reference/voxengine/acd-request#id) VoxEngine method - `account_id` (integer, optional) — The account ID - `begin_time` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The UTC start date in 24-h format: YYYY-MM-DD HH:mm:ss - `priority` (integer, optional) — The request priority - `acd_queue_id` (integer, optional) — The ACD queue ID - `user_id` (integer, optional) — The user ID - `waiting_duration` (integer, optional) — The waiting duration in seconds - `in_service_duration` (integer, optional) — The conversation duration in seconds - `after_service_duration` (integer, optional) — The after service duration in seconds - `events` (list of ACDSessionEventInfoType, optional) — The bound events - `unserviced` (boolean, optional) - `rejected` (boolean, optional) - `operator_hangup` (boolean, optional) ### ACDSessionEventInfoType The ACD session event info. - `acd_session_event_id` (integer, optional) — The ACD session event ID - `time` (string, optional) — Timestamp in YYYY-MM-DD HH:mm:ss format. The UTC start date in 24-h format: YYYY-MM-DD HH:mm:ss - `type` (string, optional) — The event type name - `user_id` (integer, optional) — The user ID - `custom_data` (string, optional) — The custom data ## Examples **Response** ```json { "result": [ { "acd_session_history_id": 123, "acd_request_id": "xLL_CWMYRiC7bG4ytf-WUk6kquVV9E9IlwowY68pdCQ", "account_id": 1, "begin_time": "2014-03-20 17:41:33", "priority": 100, "acd_queue_id": 1, "user_id": 661885, "waiting_duration": 161, "in_service_duration": 36, "after_service_duration": 0, "events": [ { "acd_session_event_id": 54, "time": "2014-03-20 17:43:15", "type": "OPERATOR_UNREACHABLE", "user_id": 661884 } ], "unserviced": false, "rejected": false, "operator_hangup": false }, { "acd_session_history_id": 124, "acd_request_id": "98oFQi0zSfKWCDurZPRtixYviCGiRk0agbtJbNOPrXs", "account_id": 1, "begin_time": "2014-03-20 17:44:35", "priority": 100, "acd_queue_id": 1, "waiting_duration": 3028, "unserviced": true, "rejected": false } ], "total_count": 2, "count": 2 } ``` **SDK Code** ```python Example 1 import requests url = "https://api.voximplant.com/platform_api/GetACDHistory" querystring = {"from_date":"2026-04-28 17:30:00","to_date":"2026-04-28 17:30:00"} headers = {"Authorization": "Bearer "} response = requests.post(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript Example 1 const url = 'https://api.voximplant.com/platform_api/GetACDHistory?from_date=2026-04-28+17%3A30%3A00&to_date=2026-04-28+17%3A30%3A00'; const options = {method: 'POST', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Example 1 package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.voximplant.com/platform_api/GetACDHistory?from_date=2026-04-28+17%3A30%3A00&to_date=2026-04-28+17%3A30%3A00" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Example 1 require 'uri' require 'net/http' url = URI("https://api.voximplant.com/platform_api/GetACDHistory?from_date=2026-04-28+17%3A30%3A00&to_date=2026-04-28+17%3A30%3A00") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java Example 1 import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.voximplant.com/platform_api/GetACDHistory?from_date=2026-04-28+17%3A30%3A00&to_date=2026-04-28+17%3A30%3A00") .header("Authorization", "Bearer ") .asString(); ``` ```php Example 1 request('POST', 'https://api.voximplant.com/platform_api/GetACDHistory?from_date=2026-04-28+17%3A30%3A00&to_date=2026-04-28+17%3A30%3A00', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp Example 1 using RestSharp; var client = new RestClient("https://api.voximplant.com/platform_api/GetACDHistory?from_date=2026-04-28+17%3A30%3A00&to_date=2026-04-28+17%3A30%3A00"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift Example 1 import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.voximplant.com/platform_api/GetACDHistory?from_date=2026-04-28+17%3A30%3A00&to_date=2026-04-28+17%3A30%3A00")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```