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

# Reports API

> Retrieve signed, time-limited CSV download URLs for your latest scheduled campaign report runs 📉

Retrieve download links for your campaign reports without logging into the Connectly UI. Each response contains a signed URL pointing to the same CSV you would download manually — making it easy to automate ingestion into a data warehouse or BI tool.

## Endpoint

```json theme={null}
GET https://api.connectly.ai/v1/businesses/{businessId}/reporting/reports
```

## Query parameters

<ParamField query="type" type="string">
  Filter results to a specific report type (e.g. `campaign.daily.v1`). If omitted, all configured report types are returned.
</ParamField>

## How it works

This endpoint returns the **most recent completed run** of each report configured for your business. Reports are generated on a fixed schedule (daily, monthly, etc.) — there is no way to trigger a new run on demand via the API.

<Warning>
  The `url` in each result is a **signed, temporary link** that expires after the report's configured TTL (1 hour by default). Always check the `expiresAt` field and download the file before then. If the URL has expired, call this endpoint again to get a fresh one from the next completed run — or subscribe to [report webhooks](/analytics/report-webhooks) to be notified the moment each new run completes.
</Warning>

## Example

```bash theme={null}
curl -X GET "https://api.connectly.ai/v1/businesses/{businessId}/reporting/reports" \
  -H "X-API-Key: YOUR_API_KEY"
```

```json theme={null}
{
  "data": [
    {
      "id": "c80716a5-62c5-4ba5-b99d-5c2a6fd39317",
      "name": "Daily campaign report",
      "type": "campaign.daily.v1",
      "lastRun": {
        "id": "c80716a5-62c5-4ba5-b99d-5c2a6fd39317",
        "status": "completed",
        "result": {
          "url": "https://reports.connectly.ai/abcdef",
          "expiresAt": "2025-05-01T13:00:00Z",
          "createdAt": "2025-04-30T12:00:00Z"
        }
      }
    }
  ]
}
```

## Response fields

| Field                             | Description                                                                  |
| --------------------------------- | ---------------------------------------------------------------------------- |
| `data[].id`                       | Unique ID of the report configuration.                                       |
| `data[].name`                     | Human-readable report name.                                                  |
| `data[].type`                     | Report type identifier — use this with the `type` query parameter to filter. |
| `data[].lastRun.id`               | ID of the most recent run.                                                   |
| `data[].lastRun.status`           | Run status: `processing`, `completed`, or `failed`.                          |
| `data[].lastRun.result.url`       | Signed URL to download the report as a CSV. Expires at `expiresAt`.          |
| `data[].lastRun.result.expiresAt` | ISO 8601 timestamp when the signed URL expires. Download before this time.   |
| `data[].lastRun.result.createdAt` | ISO 8601 timestamp when this report run completed.                           |

## Downloading the CSV

Once you have the signed URL from `result.url`, perform a standard HTTP GET to download the file. For the column reference, see [Campaign report](/analytics/campaign-report).

<Tip>
  Subscribe to [report webhooks](/analytics/report-webhooks) to receive an immediate notification — including a fresh signed URL — the moment a new report run completes, rather than polling this endpoint on a schedule.
</Tip>
