# Share Campaign

> Turn on the public report page of a campaign.

Requires an API key with the `write` scope.

Creates a public link to a read-only report. Anyone with the link, signed in or not, sees the campaign name, its totals for sent, opened, replied and bounced, and the open, reply and bounce rates. The page does not show leads, email copy or addresses. Calling this again returns the same link. Turn it off with [Unshare Campaign](/api-reference/campaigns/unshare-campaign).


## Path Parameters

<ParamField path="campaign_id" type="string" required>The campaign.</ParamField>

## Response

<ResponseField name="data" type="object">
  <Expandable title="Link">
    <ResponseField name="shareSlug" type="string">The token in the link.</ResponseField>
    <ResponseField name="shareUrl" type="string">The full link to open the report.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
```bash cURL
curl -X POST "https://api.foxreach.io/api/v1/campaigns/cmcamp1/share" \
  -H "X-API-Key: otr_your_key"
```

```python Python SDK
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
link = client.campaigns.share("cmcamp1")
print(link["share_url"])
```

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

const client = new FoxReach({ apiKey: "otr_your_key" });
const link = await client.campaigns.share("cmcamp1");
console.log(link.shareUrl);
```
</RequestExample>

<ResponseExample>
```json
{
  "data": {
    "shareSlug": "Xk3Jd9aQ2w4",
    "shareUrl": "https://foxreach.io/r/Xk3Jd9aQ2w4"
  }
}
```
</ResponseExample>

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `write` |
| `404` | Campaign not found in this workspace |

## Rate Limit

- **120 requests per minute, shared by every `write` 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` (`write`).
- 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).
