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

# Add Leads to Campaign

> Bulk-insert leads into a draft campaign.

**CLI:**

```bash theme={null}
puffle campaign lead add --id <id> --prospects <prospects>
```

## Overview

Bulk-insert leads into a `draft` campaign. Deduplicates by `email` (email campaigns) or `linkedin_url` (LinkedIn campaigns) — both within the batch and against existing rows. Identity is normalized (lowercased email; LinkedIn URLs stripped of trailing slashes and query strings). Only draft campaigns accept new leads. After insert, `campaigns.stats` is recomputed atomically.

<Note>
  This operation shares the URL path `/api/campaigns/{id}/leads` with other verbs. See [the sibling page](/api-reference/campaigns/update-lead-in-campaign) for related operations on the same resource.
</Note>


## OpenAPI

````yaml post /api/campaigns/{id}/leads
openapi: 3.0.3
info:
  title: Puffle API
  version: 1.0.0
  description: >-
    HTTP API for the Puffle GTM platform - Feed and Lead Finder search
    preparation, campaign-backed Outbound execution, Puffle Agent runs, sender
    management, and Unibox reply workflows. Designed for operation by both
    humans and autonomous AI agents. Agents should start at the [Agent
    Playbook](/guides/agent-playbook) which prescribes a workspace-context check
    (`GET /api/context`) and core user journeys with exact call ordering.
  contact:
    name: Puffle Support
    url: https://puffle.ai
servers:
  - url: https://app.puffle.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Campaigns
    description: >-
      Campaign-backed Outbound execution. These endpoints manage draft,
      launching, active, paused, and completed Outbound runs with sequence
      nodes, contacts, and sender accounts.
  - name: Accounts
    description: Signed-in user account, settings, and workspace context endpoints.
  - name: Billing
    description: Billing customer portal and account billing endpoints.
  - name: Senders
    description: >-
      Connected sender accounts, email inboxes, sending domains, DNS
      verification, warmup, and sender capacity.
  - name: Socials
    description: >-
      Read connected LinkedIn and X accounts, review current and archived posts,
      and reconcile publication status. Creating, editing, scheduling,
      publishing, OAuth connection, analytics, and mentions remain
      dashboard-managed workflows and are not part of the public Bearer-token
      API.
paths:
  /api/campaigns/{id}/leads:
    post:
      tags:
        - Campaigns
      summary: Add Leads to Campaign
      description: >-
        Bulk-insert leads into a draft campaign. Deduplicates within the request
        batch and against existing campaign leads.
      operationId: addLeadsToCampaign
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            description: Campaign UUID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                prospects:
                  minItems: 1
                  maxItems: 1000
                  type: array
                  items:
                    type: object
                    properties:
                      email:
                        type: string
                      linkedin_url:
                        type: string
                      first_name:
                        type: string
                      last_name:
                        type: string
                      company:
                        type: string
                      position:
                        type: string
                      headline:
                        type: string
                      custom_fields:
                        type: object
                        additionalProperties: {}
                    additionalProperties: false
              required:
                - prospects
              additionalProperties: false
      responses:
        '201':
          description: Leads imported successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  imported:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  duplicates:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                required:
                  - imported
                  - duplicates
                additionalProperties: false
        '400':
          description: Validation failure or campaign is not editable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '401':
          description: Missing or invalid authentication.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Campaign doesn't exist or isn't owned by the caller.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Lead import failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: pk_live_...

````