> For the complete documentation index, see [llms.txt](https://docs.systemsx.co.uk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.systemsx.co.uk/sense/api-call-history.md).

# API Call - History

## Search Calls History

<mark style="color:green;">`POST`</mark> `/v2/call/search`

**Body**

<table><thead><tr><th width="225">Param</th><th width="121">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>api_key</code></td><td>string</td><td><mark style="color:red;">required</mark></td></tr><tr><td><code>page</code></td><td>int</td><td></td></tr><tr><td><code>per_page</code></td><td>int</td><td>Default: 20, Min: 1, Max: 250</td></tr><tr><td><code>uuid</code></td><td>string</td><td>Return Single Call</td></tr><tr><td><code>transcript</code></td><td>boolean</td><td>Returns Transcripts</td></tr><tr><td><code>agents</code></td><td>array</td><td>[1,2,3,4]</td></tr><tr><td><code>direction</code></td><td>string</td><td><p>[inbound,outbound,inbound_voicemail,</p><p>outbound_voicemail]</p></td></tr><tr><td><code>phone_number</code></td><td>string</td><td></td></tr><tr><td><code>score</code></td><td>int</td><td>[Returns ===]</td></tr><tr><td><code>duration</code></td><td>int</td><td>[Returns ===]</td></tr><tr><td><code>start_date</code></td><td>date</td><td>YYYY-MM-DD</td></tr><tr><td><code>end_date</code></td><td>date</td><td>YYYY-MM-DD</td></tr><tr><td><code>show_all</code></td><td>boolean</td><td>(Default: false) Return both scored and unscored</td></tr><tr><td><code>show_unscored</code></td><td>boolean</td><td>(Default: false) Return only unscored</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "current_page": 1,
  "per_page": 20,
  "total": 3408,
  "data": [
    {
      "agent_id": 1,
      "provider": "file",
      "uuid": "000000-000000-000000-000000-000000",
      "call_type": "inbound",
      "phone_number": "+44777777777",
      "duration": 332,
      "review_score": 0,
      "time_started": "2024-08-22 16:25:16",
      "updated_at": "2024-08-22T21:01:19.000000Z",
      "agent": {
        "id": 11,
        "name": "Agent",
        "department": "Sales",
        "phone_extension": "1000",
        "email_address": null
      },
      "speakers": {
        "A": "AGENT",
        "B": "CLIENT"
      },
      "metrics": [
        {
          "metric": "overall",
          "score": 0,
          "total_possible": 0,
          "good": [],
          "bad": [],
          "improve": []
        }
      ],
      "summary": "",
      "actions": [],
      "conversation": [
        {
          "speaker": "A",
          "text": ""
        },
        {
          "speaker": "B",
          "text": ""
        }
      ],
      "fillers": [
        {
          "A": {
            "well": 1,
            "right": 2
          },
          "B": []
        }
      ],
      "highlights": [
        {
          "text": "Highlight",
          "category": "Company Names",
          "total": 2
        }
      ],
      "talking": {
        "A": {
          "seconds": 155.96485200000006,
          "percentage": 84.41
        },
        "B": {
          "seconds": 28.809985000000005,
          "percentage": 15.59
        },
        "Silence": {
          "seconds": 115.51000000000002,
          "instances": 7
        }
      }
    }
  ]
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}
