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

# Get Daily Calls

> Retrieve time-series call metrics over a specified period.

Provides an array of metrics grouped by time interval (either days or minutes depending on your parameters). This is ideal for generating line charts of call volume and duration.

### Query Parameters

<ParamField query="start_date" type="string">
  Start date in `YYYY-MM-DD` format. Defaults to 30 days ago.
</ParamField>

<ParamField query="end_date" type="string">
  End date in `YYYY-MM-DD` format. Defaults to today.
</ParamField>

<ParamField query="start_datetime" type="string">
  Start exact time in ISO 8601 format (e.g. `2024-03-01T14:30:00Z`). Changes the granularity of the time-series points to `minute`.
</ParamField>

<ParamField query="end_datetime" type="string">
  End exact time in ISO 8601 format.
</ParamField>

<ParamField query="agent_id" type="string">
  Filter the metrics to only include calls for a specific agent.
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Indicates whether the request was successful.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="period" type="object">
      The start and end boundaries of the query.
    </ResponseField>

    <ResponseField name="granularity" type="string">
      The time grouping used for the data points. Either `day` or `minute`.
    </ResponseField>

    <ResponseField name="daily" type="array">
      Array of data points matching the granularity.

      <Expandable title="items">
        <ResponseField name="date" type="string">
          The date (or exact timestamp if minute granularity) for this data point.
        </ResponseField>

        <ResponseField name="calls" type="integer">
          Total number of calls during this interval.
        </ResponseField>

        <ResponseField name="cost_credits" type="number">
          Platform credits consumed by these calls.
        </ResponseField>

        <ResponseField name="total_duration_seconds" type="number">
          Sum of call durations in seconds for this interval.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>
