> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# GetCallHistory

POST https://api.voximplant.com/platform_api/GetCallHistory

Gets the account's call history (including call duration, cost, logs and other call information). You can filter the call history by a certain date.

Allowed roles: `Owner`, `Admin`, `Developer`, `Supervisor`, `Support`.

**Example request:** Get the first call session history record with calls and record URLs from the 2020-02-25 00:00:00 UTC to the 2020-02-26 00:00:00 UTC.

Reference: https://docs.voximplant.ai/api-reference/management-api/reference/history/get-call-history

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: management-api
  version: 1.0.0
paths:
  /GetCallHistory:
    post:
      operationId: get-call-history
      summary: GetCallHistory
      description: >-
        Gets the account's call history (including call duration, cost, logs and
        other call information). You can filter the call history by a certain
        date.


        Allowed roles: `Owner`, `Admin`, `Developer`, `Supervisor`, `Support`.


        **Example request:** Get the first call session history record with
        calls and record URLs from the 2020-02-25 00:00:00 UTC to the 2020-02-26
        00:00:00 UTC.
      tags:
        - subpackage_history
      parameters:
        - name: from_date
          in: query
          description: >-
            The from date in the selected timezone in 24-h format: YYYY-MM-DD
            HH:mm:ss
          required: true
          schema:
            type: string
        - name: to_date
          in: query
          description: >-
            The to date in the selected timezone in 24-h format: YYYY-MM-DD
            HH:mm:ss
          required: true
          schema:
            type: string
        - name: call_session_history_id
          in: query
          description: >-
            To get the call history for the specific sessions, pass the session
            IDs to this parameter separated by a semicolon (;). The maximum
            number of records is 1000. You can find the session ID in the <a
            href='/docs/references/voxengine/appevents#started'>AppEvents.Started</a>
            event's **sessionID** property in a scenario, or retrieve it from
            the **call_session_history_id** value returned from the <a
            href='/api-reference/management-api/scenarios/reorderscenarios'>StartScenarios</a>
            or <a
            href='/api-reference/management-api/scenarios/startconference'>StartConference</a>
            methods
          required: false
          schema:
            type: array
            items:
              type: integer
        - name: application_id
          in: query
          description: >-
            To receive the call history for a specific application, pass the
            application ID to this parameter
          required: false
          schema:
            type: integer
        - name: application_name
          in: query
          description: The application name, can be used instead of **application_id**
          required: false
          schema:
            type: string
        - name: user_id
          in: query
          description: >-
            To receive the call history for a specific users, pass the user ID
            list separated by semicolons (;). If it is specified, the output
            contains the calls from the listed users only
          required: false
          schema:
            type: array
            items:
              type: integer
        - name: rule_name
          in: query
          description: >-
            To receive the call history for a specific routing rule, pass the
            rule name to this parameter. Applies only if you set application_id
            or application_name
          required: false
          schema:
            type: string
        - name: remote_number
          in: query
          description: >-
            To receive a call history for a specific remote numbers, pass the
            number list separated by semicolons (;). A remote number is a number
            on the client side. Ignored if the `remote_number_list` parameter is
            not empty
          required: false
          schema:
            type: array
            items:
              type: string
        - name: remote_number_list
          in: query
          description: >-
            A JS array of strings of specific remote phone numbers to sort the
            call history. Has higher priority than the `remote_number`
            parameter. If the array is empty, the `remote_number` parameter is
            used instead
          required: false
          schema:
            type: object
            additionalProperties:
              description: Any type
        - name: local_number
          in: query
          description: >-
            To receive a call history for a specific local numbers, pass the
            number list separated by semicolons (;). A local number is a number
            on the platform side
          required: false
          schema:
            type: array
            items:
              type: string
        - name: call_session_history_custom_data
          in: query
          description: >-
            To filter the call history by the custom_data passed to the call
            sessions, pass the custom data to this parameter
          required: false
          schema:
            type: string
        - name: with_calls
          in: query
          description: >-
            Whether to receive a list of sessions with all calls within the
            sessions, including phone numbers, call cost and other information
          required: false
          schema:
            type: boolean
            default: false
        - name: with_records
          in: query
          description: Whether to get the calls' records
          required: false
          schema:
            type: boolean
            default: false
        - name: with_other_resources
          in: query
          description: Whether to get other resources usage (see [ResourceUsageType])
          required: false
          schema:
            type: boolean
            default: true
        - name: child_account_id
          in: query
          description: The child account ID list separated by semicolons (;)
          required: false
          schema:
            type: array
            items:
              type: integer
        - name: children_calls_only
          in: query
          description: Whether to get the children account calls only
          required: false
          schema:
            type: boolean
            default: false
        - name: desc_order
          in: query
          description: Whether to get records in the descent order
          required: false
          schema:
            type: boolean
            default: false
        - name: with_total_count
          in: query
          description: Whether to include the 'total_count' and increase performance
          required: false
          schema:
            type: boolean
            default: true
        - name: count
          in: query
          description: The number of returning records. The maximum value is 1000
          required: false
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: >-
            The number of records to skip in the output. The maximum value of
            10000
          required: false
          schema:
            type: integer
            default: 0
        - name: Authorization
          in: header
          description: >-
            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.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/history_GetCallHistory_Response_200'
servers:
  - url: https://api.voximplant.com/platform_api
components:
  schemas:
    CallInfoTypeEndReason:
      type: object
      properties:
        code:
          type: integer
        details:
          type: string
      description: End reason code and description
      title: CallInfoTypeEndReason
    CallInfoType:
      type: object
      properties:
        call_id:
          type: integer
          description: Call's history ID
        start_time:
          type: string
          description: >-
            Timestamp in YYYY-MM-DD HH:mm:ss format.


            Call start time in the selected timezone in 24-h format: YYYY-MM-DD
            HH:mm:ss
        diversion_number:
          type: string
          description: Call forwarding number
        duration:
          type: integer
          description: Call duration in seconds
        local_number:
          type: string
          description: Local number on the platform side
        remote_number:
          type: string
          description: Remote number on the client side
        remote_number_type:
          type: string
          description: Type of the remote number, e.g., a PSTN, mobile, user or sip address
        incoming:
          type: boolean
          description: Whether the call is incoming
        successful:
          type: boolean
          description: Whether the call is successful
        transaction_id:
          type: integer
          description: Transaction ID
        record_url:
          type: string
          description: Record URL
        media_server_address:
          type: string
          description: Media server's IP address
        cost:
          type: number
          format: double
          description: Call's cost
        custom_data:
          type: string
          description: Custom data passed to the JS session
        end_reason:
          $ref: '#/components/schemas/CallInfoTypeEndReason'
          description: End reason code and description
        audio_quality:
          type: string
        direction:
          type: string
      description: The call info.
      title: CallInfoType
    ResourceUsageType:
      type: object
      properties:
        resource_usage_id:
          type: integer
          description: The resource usage ID
        resource_type:
          type: string
          description: >-
            The resource type. The possible values are CALLSESSION, VIDEOCALL,
            VIDEORECORD, VOICEMAILDETECTION, YANDEXASR, ASR, TRANSCRIPTION,
            TTS_TEXT_GOOGLE, TTS_YANDEX, AUDIOHDCONFERENCE
        cost:
          type: number
          format: double
          description: The resource cost
        description:
          type: string
          description: The description
        used_at:
          type: string
          description: >-
            Timestamp in YYYY-MM-DD HH:mm:ss format.


            The start resource using time in the selected timezone in 24-h
            format: YYYY-MM-DD HH:mm:ss
        transaction_id:
          type: integer
          description: The transaction ID
        resource_quantity:
          type: integer
          description: The resource quantity
        unit:
          type: string
          description: The resource unit
        ref_call_id:
          type: integer
          description: The reference to call
      description: The resource usage info.
      title: ResourceUsageType
    RecordType:
      type: object
      properties:
        record_id:
          type: integer
          description: The record ID
        record_name:
          type: string
          description: The record name
        cost:
          type: number
          format: double
          description: The record cost
        start_time:
          type: string
          description: >-
            Timestamp in YYYY-MM-DD HH:mm:ss format.


            The start recording time in the selected timezone in 24-h format:
            YYYY-MM-DD HH:mm:ss
        duration:
          type: integer
          description: The call duration in seconds
        record_url:
          type: string
          description: >-
            The record URL.  If you have issues accessing the record file, check
            if the application has "Secure storage of applications and logs"
            feature enabled. In this case, you need to <a
            href='/docs/guides/managementapi/secureobjects'>authorize</a>.
        transaction_id:
          type: integer
          description: The transaction ID
        file_size:
          type: number
          format: double
          description: The file size
        transcription_url:
          type: string
          description: >-
            Transcription URL. To open the URL, please add authorization
            parameters and **record_id** to it
        transcription_status:
          type: string
          description: >-
            The status of transcription. The possible values are Not required,
            In progress, Complete
        hd_audio:
          type: boolean
        transcription_transaction_id:
          type: integer
        is_removed:
          type: boolean
        lossless:
          type: boolean
        expiration_date:
          type: string
        media_parameters:
          type: string
      description: The record info.
      title: RecordType
    CallSessionInfoType:
      type: object
      properties:
        audio_quality:
          type: string
          description: >-
            Call's audio quality. The possible values are: Standard | HD | Ultra
            HD.
        rule_name:
          type: string
          description: Routing rule name
        application_name:
          type: string
          description: Application name
        call_session_history_id:
          type: integer
          description: Unique JS session identifier
        account_id:
          type: integer
          description: Account ID that initiates the JS session
        application_id:
          type: integer
          description: Application ID that initiates the JS session
        user_id:
          type: integer
          description: User ID that initiates the JS session
        start_date:
          type: string
          description: >-
            Timestamp in YYYY-MM-DD HH:mm:ss format.


            Start date in the selected timezone in 24-h format: YYYY-MM-DD
            HH:mm:ss
        duration:
          type: integer
          description: >-
            Entire JS session duration in seconds. The session can contain
            multiple calls
        initiator_address:
          type: string
          description: Initiator's IP address
        media_server_address:
          type: string
          description: Media server IP address
        log_file_url:
          type: string
          description: >-
            Link to the session log. The log retention policy is 1 month, after
            that time this field clears. If you have issues accessing the log
            file, check if the application has "Secure storage of applications
            and logs" feature enabled. In this case, you need to <a
            href='/docs/guides/managementapi/secureobjects'>authorize</a>.
        finish_reason:
          type: string
          description: >-
            Finish reason. Possible values are __Normal termination__,
            __Insufficient funds__, __Internal error (billing timeout)__,
            __Terminated administratively__, __JS session error__, __Timeout__
        calls:
          type: array
          items:
            $ref: '#/components/schemas/CallInfoType'
          description: >-
            Calls within the JS session, including durations, cost, phone
            numbers and other information
        other_resource_usage:
          type: array
          items:
            $ref: '#/components/schemas/ResourceUsageType'
          description: Used resources
        records:
          type: array
          items:
            $ref: '#/components/schemas/RecordType'
          description: Bound records
        custom_data:
          type: string
          description: Custom data
        active:
          type: boolean
      description: The [GetCallHistory] function result item.
      title: CallSessionInfoType
    history_GetCallHistory_Response_200:
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/CallSessionInfoType'
          description: The CallSessionInfoType records
        total_count:
          type: integer
          description: The total found call session count
        count:
          type: integer
          description: The returned call session count
        timezone:
          type: string
          description: The used timezone
      title: history_GetCallHistory_Response_200
  securitySchemes:
    JwtAuth:
      type: http
      scheme: bearer
      description: >-
        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.

```

## SDK Code Examples

```python Example 1
import requests

url = "https://api.voximplant.com/platform_api/GetCallHistory"

querystring = {"from_date":"2026-04-28 17:30:00","to_date":"2026-04-28 17:30:00"}

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Example 1
const url = 'https://api.voximplant.com/platform_api/GetCallHistory?from_date=2026-04-28+17%3A30%3A00&to_date=2026-04-28+17%3A30%3A00';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

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/GetCallHistory?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 <token>")

	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/GetCallHistory?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 <token>'

response = http.request(request)
puts response.read_body
```

```java Example 1
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.voximplant.com/platform_api/GetCallHistory?from_date=2026-04-28+17%3A30%3A00&to_date=2026-04-28+17%3A30%3A00")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Example 1
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.voximplant.com/platform_api/GetCallHistory?from_date=2026-04-28+17%3A30%3A00&to_date=2026-04-28+17%3A30%3A00', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Example 1
using RestSharp;

var client = new RestClient("https://api.voximplant.com/platform_api/GetCallHistory?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 <token>");
IRestResponse response = client.Execute(request);
```

```swift Example 1
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.voximplant.com/platform_api/GetCallHistory?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()
```