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

# Add leads to a campaign

> Add leads to an existing campaign. Batch operation — up to 100 leads at a time.



## OpenAPI

````yaml /openapi.json post /v1/leads/add_to_campaign
openapi: 3.0.0
info:
  title: Botdog API
  description: |-
    API documentation for Botdog.

    **Authentication**: Pass your API key as the `x-api-key` header.
    Example: `x-api-key: bd_live_abc123`

    Do NOT use the `Authorization` header.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.botdog.co
    description: Production
security: []
tags:
  - name: campaigns
    description: >-
      Create, read, update, and control campaigns (pause/resume, pause
      activities, archive, delete).
  - name: leads
    description: >-
      List and filter leads, read full detail + event history, update metadata,
      add to a campaign, or stop a sequence.
  - name: lists
    description: Manage lead/audience lists and their members.
  - name: blacklist
    description: Manage suppression lists (excluded profiles).
  - name: snippets
    description: Manage message snippets / templates.
  - name: accounts
    description: >-
      Connected LinkedIn accounts (seats), their connection health, and daily
      sending limits.
  - name: webhooks
    description: Manage webhook subscriptions.
  - name: messaging
    description: >-
      Send messages and replies, schedule a future send, and mark conversations
      read/unread. Rate-limited per sending account.
  - name: analytics
    description: Team-level analytics totals, daily breakdowns, and per-user metrics.
  - name: users
    description: Read the users in your team.
  - name: teams
    description: Current team context.
  - name: health
    description: Service health checks (no authentication).
paths:
  /v1/leads/add_to_campaign:
    post:
      tags:
        - leads
      summary: Add leads to a campaign
      description: >-
        Add leads to an existing campaign. Batch operation — up to 100 leads at
        a time.
      operationId: LeadsController_createBatch
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLeadsBatchDto'
      responses:
        '201':
          description: The leads have been successfully added to the campaign
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateLeadsBatchResponseDto'
        '401':
          description: Unauthorized. API key is missing or invalid.
        '429':
          description: Rate limit exceeded. Retry after cooldown.
      security:
        - api-key: []
components:
  schemas:
    CreateLeadsBatchDto:
      type: object
      properties:
        campaignId:
          type: string
          description: The campaign ID to add these leads to
          example: 123e4567-e89b-12d3-a456-426614174000
        leads:
          description: Array of leads to create (maximum 100)
          type: array
          items:
            $ref: '#/components/schemas/LeadCreateDto'
      required:
        - campaignId
        - leads
    CreateLeadsBatchResponseDto:
      type: object
      properties:
        count:
          type: number
          description: The number of leads successfully created
          example: 50
        campaignId:
          type: string
          description: The campaign ID the leads were added to
          example: 123e4567-e89b-12d3-a456-426614174000
      required:
        - count
        - campaignId
    LeadCreateDto:
      type: object
      properties:
        name:
          type: string
          description: The name of the lead
          example: John Doe
        linkedinUrl:
          type: string
          description: >-
            LinkedIn profile URL of the lead (https:// will be added
            automatically if missing)
          example: https://www.linkedin.com/in/johndoe
        title:
          type: string
          description: Job title of the lead
          example: Software Engineer
        company:
          type: string
          description: Company of the lead
          example: Acme Inc.
        location:
          type: string
          description: Location of the lead
          example: San Francisco, CA
        customAttributes:
          type: object
          description: >-
            Any additional attributes for the lead that can be used in workflow
            messages
          example:
            customKey1: customValue1
            customKey2: customValue2
      required:
        - linkedinUrl
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key
      x-default: bd_live_your_key_here

````