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

# Add Leads to Campaign

> Add one or more leads to an existing campaign. Leads are automatically deduplicated within the same campaign.

## Headers

<ParamField header="token" type="string" required>
  Your LinkedCamp API token.
</ParamField>

## Body Parameters

<ParamField body="campaignId" type="string" required>
  The ID of the campaign to add leads to. The campaign must not be in `DELETED` or `FAILED` status.
</ParamField>

<ParamField body="leads" type="array" required>
  Array of lead objects to add.

  <Expandable title="Lead Object Properties">
    <ParamField body="profileLink" type="string" required>
      LinkedIn profile URL of the lead. Supports standard LinkedIn URLs, Sales Navigator URLs, and Recruiter URLs.
    </ParamField>

    <ParamField body="firstName" type="string">
      Lead's first name.
    </ParamField>

    <ParamField body="lastName" type="string">
      Lead's last name.
    </ParamField>

    <ParamField body="fullName" type="string">
      Lead's full name. If not provided but firstName and lastName are, it will be auto-generated.
    </ParamField>
  </Expandable>
</ParamField>

<Note>
  * Leads that already exist in the campaign (matched by `profileLink`) will be skipped.
  * Sales Navigator and Recruiter URLs are automatically converted to standard LinkedIn URLs.
  * You can pass additional custom fields on each lead object.
</Note>

## Response

<ResponseField name="success" type="boolean">
  Whether the request was successful.
</ResponseField>

<ResponseField name="message" type="string">
  A human-readable result message.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.linkedcamp.com/leads/add-to-campaign \
    -H "token: YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "campaignId": "60f7a1b2c3d4e5f6a7b8c9d0",
      "leads": [
        {
          "profileLink": "https://www.linkedin.com/in/johndoe",
          "firstName": "John",
          "lastName": "Doe"
        },
        {
          "profileLink": "https://www.linkedin.com/in/janesmith",
          "firstName": "Jane",
          "lastName": "Smith"
        }
      ]
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.linkedcamp.com/leads/add-to-campaign",
      headers={"token": "YOUR_API_TOKEN"},
      json={
          "campaignId": "60f7a1b2c3d4e5f6a7b8c9d0",
          "leads": [
              {
                  "profileLink": "https://www.linkedin.com/in/johndoe",
                  "firstName": "John",
                  "lastName": "Doe",
              },
              {
                  "profileLink": "https://www.linkedin.com/in/janesmith",
                  "firstName": "Jane",
                  "lastName": "Smith",
              },
          ],
      },
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.linkedcamp.com/leads/add-to-campaign",
    {
      method: "POST",
      headers: {
        "token": "YOUR_API_TOKEN",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        campaignId: "60f7a1b2c3d4e5f6a7b8c9d0",
        leads: [
          {
            profileLink: "https://www.linkedin.com/in/johndoe",
            firstName: "John",
            lastName: "Doe",
          },
          {
            profileLink: "https://www.linkedin.com/in/janesmith",
            firstName: "Jane",
            lastName: "Smith",
          },
        ],
      }),
    }
  );
  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Leads added successfully"
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "message": "Failed to add leads into this campaign!"
  }
  ```
</ResponseExample>
