> ## Documentation Index
> Fetch the complete documentation index at: https://blackbox.dasha.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Call History

> View, filter, and search past calls. Access transcripts, recordings, and detailed call information through the dashboard or API.

Find any past call. Filter by status, date, agent, or endpoint — then drill down to transcripts, recordings, and tool executions for complete conversation analysis.

**What you'll learn:** Filtering and searching calls, viewing call details, and API response structure.

## Access call history

<Tabs>
  <Tab title="Dashboard">
    Navigate to **Calls** in the sidebar to view all calls.
  </Tab>

  <Tab title="From agent">
    Navigate to **Agents** → Select agent → **Calls** tab to view calls for that specific agent.
  </Tab>

  <Tab title="API">
    ```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
    // Search call results with pagination
    const response = await fetch(
      'https://blackbox.dasha.ai/api/v1/callresults/search',
      {
        method: 'POST',
        headers: {
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({
          page: 0,
          size: 50
        })
      }
    ).then(r => r.json());

    console.log(`Total calls: ${response.totalCount}`);
    response.results.forEach(call => {
      console.log(`${call.callId}: ${call.callStatus}`);
    });
    ```
  </Tab>
</Tabs>

***

## Filter calls

### By status

Filter calls by their final outcome:

| Status        | Description                         |
| ------------- | ----------------------------------- |
| **Completed** | Conversation finished successfully  |
| **Failed**    | Error occurred during call          |
| **Canceled**  | Call was canceled before completion |
| **Running**   | Call currently in progress          |
| **Queued**    | Waiting in queue                    |
| **Pending**   | Waiting to be queued                |
| **Created**   | Just created, not yet queued        |

<Accordion title="API example: Filter by status">
  ```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await fetch(
    'https://blackbox.dasha.ai/api/v1/callresults/search',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        callStatuses: ['Completed', 'Failed'],
        page: 0,
        size: 50
      })
    }
  ).then(r => r.json());
  ```
</Accordion>

<Accordion title="Filter by date range">
  ```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await fetch(
    'https://blackbox.dasha.ai/api/v1/callresults/search',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        fromDate: '2025-01-01T00:00:00Z',
        toDate: '2025-01-31T23:59:59Z',
        page: 0,
        size: 50
      })
    }
  ).then(r => r.json());

  console.log(`Calls in January: ${response.totalCount}`);
  ```
</Accordion>

<Accordion title="Filter by agent">
  ```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await fetch(
    'https://blackbox.dasha.ai/api/v1/callresults/search',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        agentIds: ['YOUR_AGENT_ID'],
        page: 0,
        size: 50
      })
    }
  ).then(r => r.json());

  console.log(`Agent calls: ${response.totalCount}`);
  ```
</Accordion>

<Accordion title="Full-text search">
  Search across transcripts and metadata:

  ```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await fetch(
    'https://blackbox.dasha.ai/api/v1/callresults/search',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        searchText: 'connection timeout',
        page: 0,
        size: 50
      })
    }
  ).then(r => r.json());
  ```
</Accordion>

***

## View call details

### Quick details

Click any call row to expand inline details:

* **Full call ID** — Complete identifier for API operations
* **Duration and timestamps** — Precise timing information
* **Agent configuration** — Agent that handled the call
* **Additional data** — Custom metadata passed when scheduling
* **Transcript preview** — Quick view of conversation

### Open Call Inspector

Click the **Inspect** button for full analysis:

* Complete transcript with timestamps
* Audio recording playback
* Tool execution logs
* LLM interaction details
* Performance metrics

<Card title="Call Inspector" icon="magnifying-glass" href="/docs/test/call-inspector">
  Deep dive into individual calls
</Card>

***

## API response structure

### Search call results

**Request:** `POST /api/v1/callresults/search`

**Request body:**

| Field                 | Type           | Description                |
| --------------------- | -------------- | -------------------------- |
| `page`                | integer        | Page number (0-indexed)    |
| `size`                | integer        | Results per page (max 100) |
| `fromDate`            | DateTimeOffset | Filter start date          |
| `toDate`              | DateTimeOffset | Filter end date            |
| `agentIds`            | string\[]      | Filter by agents           |
| `callStatuses`        | CallStatus\[]  | Filter by status           |
| `searchText`          | string         | Full-text search           |
| `includeAggregations` | boolean        | Include statistics         |

<Accordion title="Example: Search response">
  ```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "results": [
      {
        "callId": "call_abc123",
        "agentId": "agent_def456",
        "orgId": "org_xyz",
        "callStatus": "Completed",
        "callType": "OutboundAudio",
        "createdTime": "2025-01-20T10:30:00Z",
        "completedTime": "2025-01-20T10:35:00Z",
        "durationSeconds": 300,
        "endpoint": "+1-555-123-4567",
        "callAdditionalData": {
          "customerId": "cust_123"
        },
        "transcription": [...],
        "result": {...},
        "inspectorUrl": "https://...",
        "recordingUrl": "https://..."
      }
    ],
    "totalCount": 150,
    "page": 0,
    "size": 20,
    "totalPages": 8,
    "executionTimeMs": 45
  }
  ```
</Accordion>

### Get single call

**Request:** `GET /api/v1/calls/{callId}`

Returns call details including status, timestamps, and endpoint.

***

## Get call queue

View scheduled and pending calls:

**Request:** `GET /api/v1/calls/queue/list`

**Query parameters:**

| Parameter  | Type           | Description                |
| ---------- | -------------- | -------------------------- |
| `skip`     | integer        | Items to skip              |
| `take`     | integer        | Items to return (max 1000) |
| `agentId`  | string         | Filter by agent            |
| `status`   | CallStatus\[]  | Filter by status           |
| `fromDate` | DateTimeOffset | Filter start date          |
| `toDate`   | DateTimeOffset | Filter end date            |

***

## Call statistics

Get aggregated call statistics:

**Request:** `GET /api/v1/calls/statistics/statuses`

```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
const response = await fetch(
  'https://blackbox.dasha.ai/api/v1/calls/statistics/statuses',
  { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
).then(r => r.json());

console.log('Call counts by status:', response.statuses);
// { Created: 5, Pending: 3, Queued: 10, Running: 2, Completed: 150, Failed: 12, Canceled: 8 }
```

***

## Common tasks

<Accordion title="Find failed calls">
  ```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await fetch(
    'https://blackbox.dasha.ai/api/v1/callresults/search',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        callStatuses: ['Failed'],
        sortField: 'completedTime',
        sortDirection: 'Descending',
        size: 50
      })
    }
  ).then(r => r.json());

  // Review error messages
  response.results.forEach(call => {
    console.log(`${call.callId}: ${call.errorMessage}`);
  });
  ```
</Accordion>

<Accordion title="Search by custom field">
  Query calls using custom fields in additional data:

  ```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await fetch(
    'https://blackbox.dasha.ai/api/v1/callresults/search',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        additionalDataFilters: {
          'result.postCallAnalysis.sentiment': 'positive',
          'result.postCallAnalysis.info.age': { 'gte': 25, 'lte': 65 }
        },
        size: 100
      })
    }
  ).then(r => r.json());
  ```
</Accordion>

<Accordion title="Get aggregations">
  ```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const response = await fetch(
    'https://blackbox.dasha.ai/api/v1/callresults/search',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        includeAggregations: true,
        aggregationFields: ['result.postCallAnalysis.sentiment'],
        size: 0  // Only get aggregations, no results
      })
    }
  ).then(r => r.json());

  console.log('Status counts:', response.aggregations?.statusCounts);
  console.log('Agent counts:', response.aggregations?.agentCounts);
  ```
</Accordion>

***

## Call statuses reference

| Status        | Description                            |
| ------------- | -------------------------------------- |
| **Created**   | Call created but not yet queued        |
| **Pending**   | Waiting to be queued                   |
| **Queued**    | In queue, waiting for resources        |
| **Running**   | Call in progress                       |
| **Completed** | Successfully finished                  |
| **Failed**    | Error occurred                         |
| **Canceled**  | Manually canceled or deadline exceeded |

***

## What's next

<CardGroup cols={2}>
  <Card title="Call Inspector" icon="magnifying-glass" href="/docs/test/call-inspector">
    Deep dive into individual calls
  </Card>

  <Card title="Conversations" icon="file-lines" href="/docs/introduction/conversations">
    Understand call transcripts
  </Card>

  <Card title="Concurrency Monitoring" icon="chart-line" href="/docs/monitor/concurrency-monitoring">
    Monitor active calls
  </Card>
</CardGroup>
