# Campaign Leaderboard

> The five campaigns with the most replies.

Requires an API key with the `read` scope.

## Response

<ResponseField name="data" type="array">
  <Expandable title="Campaign">
    <ResponseField name="id" type="string">Campaign id.</ResponseField>
    <ResponseField name="name" type="string">Campaign name.</ResponseField>
    <ResponseField name="sent" type="integer">Emails sent.</ResponseField>
    <ResponseField name="replied" type="integer">Replies.</ResponseField>
    <ResponseField name="replyRate" type="number">Replies as a percentage of sent (1 decimal).</ResponseField>
    <ResponseField name="status" type="string">Campaign status.</ResponseField>
  </Expandable>
</ResponseField>

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

```python Python SDK
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
top = client.analytics.leaderboard()
```

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

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

<ResponseExample>
```json
{
  "data": [
    {"id": "cmp_abc123", "name": "Founders Q4", "sent": 900, "replied": 54, "replyRate": 6.0, "status": "active"}
  ]
}
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `read` |

## 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).
