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

# Get inbound report

> Tabular inbound call report with optional CSV export

Returns a paginated tabular report of inbound calls for an inbound configuration.

Set `export_csv=true` to download CSV (`text/csv`) instead of JSON.

## Authentication

<ParamField header="X-API-Key" type="string" required>
  Project API key for this organization and project. Format: `bot_live_…`
</ParamField>

## Path parameters

<ParamField path="organization_id" type="string" required>
  Organization ID. Must match the API key.
</ParamField>

<ParamField path="project_id" type="string" required>
  Project ID. Must match the API key.
</ParamField>

<ParamField path="inbound_id" type="string" required>
  Inbound configuration ID.
</ParamField>

## Query parameters

<ParamField query="skip" type="integer" default="0">
  Number of rows to skip.
</ParamField>

<ParamField query="limit" type="integer" default="20">
  Page size. Range: `1`–`100`.
</ParamField>

<ParamField query="export_csv" type="boolean" default="false">
  When `true`, returns a CSV file download instead of JSON.
</ParamField>

<ParamField query="filters" type="string">
  JSON filter object, for example `{"status":"completed"}`.
</ParamField>

<ParamField query="sort" type="string">
  JSON sort object, for example `{"created_at":-1}`.
</ParamField>

## Response

JSON mode:

<ResponseField name="columns" type="array" required>
  Column definitions (`key`, `header`, and related metadata).
</ResponseField>

<ResponseField name="rows" type="array" required>
  Report rows keyed by column `key`.
</ResponseField>

<ResponseField name="pagination" type="object" required>
  Pagination metadata for the rows.
</ResponseField>

CSV mode returns raw CSV with `Content-Disposition: attachment; filename=report_calls_YYYYMMDD_HHMMSS.csv`.

## Errors

<ResponseField name="401" type="Unauthorized">
  Missing, invalid, or revoked API key.
</ResponseField>

<ResponseField name="403" type="Forbidden">
  API key is not authorized for this organization or project.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -G "https://backend.botcadence.com/organizations/ORG_ID/projects/PROJECT_ID/inbounds/INBOUND_ID/report" \
    -H "X-API-Key: bot_live_YOUR_KEY" \
    --data-urlencode "skip=0" \
    --data-urlencode "limit=20" \
    --data-urlencode 'filters={"status":"completed"}'
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    skip: "0",
    limit: "20",
    filters: JSON.stringify({ status: "completed" }),
  });

  const response = await fetch(
    `https://backend.botcadence.com/organizations/${organizationId}/projects/${projectId}/inbounds/${inboundId}/report?${params}`,
    { headers: { "X-API-Key": process.env.BOTCADENCE_API_KEY } }
  );
  ```

  ```python Python theme={null}
  import json
  import os
  import requests

  response = requests.get(
      f"https://backend.botcadence.com/organizations/{organization_id}/projects/{project_id}/inbounds/{inbound_id}/report",
      headers={"X-API-Key": os.environ["BOTCADENCE_API_KEY"]},
      params={
          "skip": 0,
          "limit": 20,
          "filters": json.dumps({"status": "completed"}),
      },
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "status": "success",
    "message": "Inbound report data retrieved successfully",
    "data": {
      "columns": [
        { "key": "phone_number", "header": "Phone" },
        { "key": "status", "header": "Status" },
        { "key": "duration_seconds", "header": "Duration" }
      ],
      "rows": [
        {
          "phone_number": "+14155550123",
          "status": "completed",
          "duration_seconds": 98
        }
      ],
      "pagination": {
        "total": 42,
        "page": 1,
        "page_size": 20,
        "total_pages": 3,
        "has_next": true,
        "has_prev": false
      }
    },
    "status_code": 200
  }
  ```
</ResponseExample>
