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

# Add Leads to Campaign

> Add one or more leads to a campaign by their IDs.

## Path Parameters

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

## Body Parameters

<ParamField body="leadIds" type="array" required>
  Array of lead IDs to add to the campaign.
</ParamField>

## Response

<ResponseField name="data" type="object">
  <Expandable title="Result">
    <ResponseField name="added" type="integer">Number of leads successfully added.</ResponseField>
    <ResponseField name="skipped" type="integer">Number of leads skipped (already in campaign or invalid ID).</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.foxreach.io/api/v1/campaigns/cmp_abc123/leads" \
    -H "X-API-Key: otr_your_key" \
    -H "Content-Type: application/json" \
    -d '{
      "leadIds": ["cld_xyz789", "cld_def456", "cld_ghi012"]
    }'
  ```

  ```python Python SDK theme={null}
  from foxreach import FoxReach

  client = FoxReach(api_key="otr_your_key")
  result = client.campaigns.add_leads("cmp_xyz789", ["cld_lead1", "cld_lead2"])
  ```

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

  const client = new FoxReach({ apiKey: "otr_your_key" });
  const result = await client.campaigns.addLeads("cmp_xyz789", ["cld_lead1", "cld_lead2"]);
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "data": {
      "added": 2,
      "skipped": 1
    }
  }
  ```
</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).
