# Get Campaign Provider Mix

> See how a campaign's sending mailboxes and leads split across Google, Microsoft and other mail providers.

Use this to check whether provider matching (`espMatching`) has enough of the right mailboxes to work with. The counts come from lookups FoxReach has already stored, so the request is fast and never waits on a lookup. Leads whose provider is not looked up yet are counted as `unresolved`.

## Path Parameters

<ParamField path="campaign_id" type="string" required>
  The unique identifier of the campaign.
</ParamField>

## Response

<ResponseField name="data" type="object">
  <Expandable title="Provider mix object">
    <ResponseField name="enabled" type="boolean">Whether provider matching is on for the campaign.</ResponseField>
    <ResponseField name="senders" type="object">Assigned mailboxes by provider: `google`, `microsoft`, `other`.</ResponseField>
    <ResponseField name="leads" type="object">Campaign leads by their email provider: `google`, `microsoft`, `other`, `unresolved`.</ResponseField>
    <ResponseField name="totalLeads" type="integer">Leads in the campaign.</ResponseField>
    <ResponseField name="resolvedPct" type="integer">Share of leads (0-100) whose provider is already looked up.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
```bash cURL
curl -X GET "https://api.foxreach.io/api/v1/campaigns/cmp_abc123/esp-mix" \
  -H "X-API-Key: otr_your_key"
```

```python Python SDK (beta)
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
mix = client.campaigns.get_esp_mix("cmp_xyz789")
```

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

const client = new FoxReach({ apiKey: "otr_your_key" });
const mix = await client.campaigns.getEspMix("cmp_xyz789");
```
</RequestExample>

<ResponseExample>
```json
{
  "data": {
    "enabled": true,
    "senders": { "google": 2, "microsoft": 1, "other": 0 },
    "leads": { "google": 120, "microsoft": 60, "other": 15, "unresolved": 5 },
    "totalLeads": 200,
    "resolvedPct": 98
  }
}
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `404` | Campaign not found |

## Rate Limit

- **100 requests per minute, per API key.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (unix epoch seconds).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns (`Retry-After`, exponential backoff, monitoring `X-RateLimit-Remaining`), see [Rate Limiting](/rate-limiting).
