# Agency Overview

> Totals across every client workspace of an Agency account.

Requires an API key with the `read` scope.

Only API keys of an Agency workspace can call this endpoint (`403 agency_required` otherwise). The call always runs in the key's own workspace; `X-Workspace-Id` is ignored.

## Response

<ResponseField name="data" type="object">
  <Expandable title="data">
    <ResponseField name="workspaces" type="integer">Workspaces owned by the agency owner.</ResponseField>
    <ResponseField name="totalContacts" type="integer">Contacts across all workspaces.</ResponseField>
    <ResponseField name="totalCampaigns" type="integer">Campaigns across all workspaces.</ResponseField>
    <ResponseField name="activeCampaigns" type="integer">Campaigns currently sending.</ResponseField>
    <ResponseField name="totalAccounts" type="integer">Email accounts connected.</ResponseField>
    <ResponseField name="connectedAccounts" type="integer">Accounts connected and active.</ResponseField>
    <ResponseField name="errorAccounts" type="integer">Accounts in an error state.</ResponseField>
    <ResponseField name="totalSentThisMonth" type="integer">Emails sent this month.</ResponseField>
    <ResponseField name="totalReplies" type="integer">Real replies.</ResponseField>
    <ResponseField name="replyRate" type="number">Replies as a percentage of emails sent this month.</ResponseField>
    <ResponseField name="alerts" type="array">Items needing attention, each with `type` (`error`, `warning` or `info`) and `message`.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
```bash cURL
curl "https://api.foxreach.io/api/v1/agency/overview" \
  -H "X-API-Key: otr_your_key"
```

```python Python SDK
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
overview = client.agency.overview()
```

```typescript TypeScript SDK
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
const overview = await client.agency.overview();
```
</RequestExample>

<ResponseExample>
```json
{
  "data": {
    "workspaces": 4,
    "totalContacts": 12840,
    "totalCampaigns": 9,
    "activeCampaigns": 3,
    "totalAccounts": 14,
    "connectedAccounts": 13,
    "errorAccounts": 1,
    "totalSentThisMonth": 28410,
    "totalReplies": 412,
    "replyRate": 1.5,
    "alerts": [{"type": "error", "message": "1 email account(s) disconnected"}]
  }
}
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `read` |
| `403` | `agency_required`: the key's workspace does not hold an Agency plan |

## Rate Limit

- **300 requests per minute, shared by every `read` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`read`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns, see [Rate Limiting](/rate-limiting).
