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

# Get call statistics for the authenticated tenant

> Returns aggregate statistics about calls including totals, completion rates, escalation rates, and average duration.

Returns aggregate statistics about calls including totals,
completion rates, escalation rates, and average duration.

### Response

`CallStatsResponse`

<ResponseField name="ok" type="boolean" required>
  Whether the request succeeded
</ResponseField>

<ResponseField name="stats" type="CallStats" required>
  Aggregate call statistics

  <Expandable title="CallStats">
    <ResponseField name="answer_rate" type="number,null (double)">
      Human-answer rate among calls with a normalized terminal outcome.
    </ResponseField>

    <ResponseField name="answered_calls" type="integer (int64)" required>
      Number of calls answered by a human.
    </ResponseField>

    <ResponseField name="avg_duration_seconds" type="number,null (double)">
      Average call duration in seconds
    </ResponseField>

    <ResponseField name="busy_calls" type="integer (int64)" required>
      Number of calls that reached a busy line.
    </ResponseField>

    <ResponseField name="calls_last_24h" type="integer (int64)" required>
      Number of calls in the last 24 hours
    </ResponseField>

    <ResponseField name="completed_calls" type="integer (int64)" required>
      Number of completed calls
    </ResponseField>

    <ResponseField name="escalated_calls" type="integer (int64)" required>
      Number of escalated calls
    </ResponseField>

    <ResponseField name="failed_calls" type="integer (int64)" required>
      Number of failed calls
    </ResponseField>

    <ResponseField name="failed_outcome_calls" type="integer (int64)" required>
      Number of calls with failed normalized outcome.
    </ResponseField>

    <ResponseField name="no_answer_calls" type="integer (int64)" required>
      Number of calls that rang without answer.
    </ResponseField>

    <ResponseField name="total_calls" type="integer (int64)" required>
      Total number of calls
    </ResponseField>

    <ResponseField name="voicemail_calls" type="integer (int64)" required>
      Number of calls that reached voicemail.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="tenant" type="string" required>
  Authenticated tenant identifier
</ResponseField>

### Status codes

| Code  | Meaning                        |
| ----- | ------------------------------ |
| `200` | Call statistics                |
| `401` | Unauthorized                   |
| `500` | Internal server error          |
| `503` | Call logging is not configured |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.voice.stateset.com/api/v1/call-logs/stats' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "ok": true,
    "stats": {
      "answer_rate": 0.762,
      "answered_calls": 820,
      "avg_duration_seconds": 185.5,
      "busy_calls": 18,
      "calls_last_24h": 42,
      "completed_calls": 1100,
      "escalated_calls": 87,
      "failed_calls": 23,
      "failed_outcome_calls": 23,
      "no_answer_calls": 75,
      "total_calls": 1250,
      "voicemail_calls": 140
    },
    "tenant": "tenant_123"
  }
  ```
</ResponseExample>
