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

# Retrieve Integration-Wide Call Metrics — Shilo API

> Retrieve aggregated call performance metrics for your entire Shilo integration. Filter by date range, source, stage, team, and call direction.

Use this endpoint to retrieve rolled-up call performance metrics across your entire Shilo integration. The data returned matches what you see in the team-level insights view in the Shilo web app, making it straightforward to embed organization-wide KPIs in your own dashboards or reporting tools. Filter results by date range, call source, pipeline stage, team, and call direction.

## Endpoint

```
GET https://api.shilo.ai/api/v1/integration/metrics
```

## Authentication

Include your API key in the request header:

```
x-api-key: YOUR_API_KEY
```

## Query Parameters

<ParamField query="date_gte" type="string">
  Inclusive lower date bound as an ISO date or date-time. Date-only values use UTC start of day. Defaults to UTC start of day 29 days ago. Example: `2026-03-26T00:00:00Z`.
</ParamField>

<ParamField query="date_lte" type="string">
  Inclusive upper date bound as an ISO date or date-time. Date-only values use UTC end of day. Defaults to the request time. Example: `2026-04-24T18:30:00Z`.
</ParamField>

<ParamField query="source" type="string">
  Comma-separated list of source IDs to filter by. Example: `source-1,source-2`.
</ParamField>

<ParamField query="stage" type="string">
  Comma-separated list of pipeline stage IDs to filter by. Example: `stage-1,stage-2`.
</ParamField>

<ParamField query="team" type="string">
  Comma-separated list of team IDs to filter by. Example: `team-1,team-2`.
</ParamField>

<ParamField query="type" type="string" default="all">
  Filter by call direction. Accepted values: `all`, `inbound`, `outbound`.
</ParamField>

## Response

### 200 — Success

Returns a `Metrics` object containing aggregated call performance data for the requested date window and filters. The fields mirror the calculations shown in the Shilo web app insights view.

### 400 — Bad Request

One or more query parameters are invalid. Check that date values are valid ISO-8601 strings and that `type` is one of `all`, `inbound`, or `outbound`.

### 401 — Unauthorized

Your API key is missing or invalid.

## Example Request

```bash theme={null}
curl --request GET \
  --url "https://api.shilo.ai/api/v1/integration/metrics?date_gte=2026-03-26T00:00:00Z&date_lte=2026-04-24T18:30:00Z&type=outbound" \
  --header "x-api-key: YOUR_API_KEY"
```
