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

# Add leads to a campaign

> Up to 100 leads per call. Safe to retry: people already in the campaign are skipped and counted in `skipped_existing_count`.



## OpenAPI

````yaml /openapi.json post /v1/campaigns/{campaign_id}/leads
openapi: 3.1.0
info:
  title: Cluster API
  version: '1'
servers:
  - url: https://api.getcluster.ai
security: []
paths:
  /v1/campaigns/{campaign_id}/leads:
    post:
      tags:
        - Campaigns
      summary: Add leads to a campaign
      description: >-
        Up to 100 leads per call. Safe to retry: people already in the campaign
        are skipped and counted in `skipped_existing_count`.
      operationId: add_campaign_leads
      parameters:
        - name: campaign_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Campaign Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddLeadsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddLeadsResult'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Payment Required
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '429':
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '503':
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
      security:
        - ApiKey: []
components:
  schemas:
    AddLeadsRequest:
      properties:
        leads:
          items:
            $ref: '#/components/schemas/LeadInput'
          type: array
          maxItems: 100
          minItems: 1
          title: Leads
      additionalProperties: false
      type: object
      required:
        - leads
      title: AddLeadsRequest
    AddLeadsResult:
      properties:
        requested_count:
          type: integer
          title: Requested Count
        added_count:
          type: integer
          title: Added Count
        enrolled_count:
          type: integer
          title: Enrolled Count
        skipped_existing_count:
          type: integer
          title: Skipped Existing Count
        skipped_duplicate_count:
          type: integer
          title: Skipped Duplicate Count
        skipped_unreachable_count:
          type: integer
          title: Skipped Unreachable Count
      type: object
      required:
        - requested_count
        - added_count
        - enrolled_count
        - skipped_existing_count
        - skipped_duplicate_count
        - skipped_unreachable_count
      title: AddLeadsResult
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorResponse
    LeadInput:
      anyOf:
        - properties:
            linkedin_url:
              type: string
          required:
            - linkedin_url
        - properties:
            email:
              type: string
          required:
            - email
      properties:
        linkedin_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Linkedin Url
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
        full_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Full Name
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        company:
          anyOf:
            - type: string
            - type: 'null'
          title: Company
        company_domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Company Domain
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
        custom_variables:
          additionalProperties: true
          type: object
          title: Custom Variables
      additionalProperties: false
      type: object
      title: LeadInput
      description: >-
        A person to add. Needs a LinkedIn profile URL or an email; a batch with
        a lead that has neither is rejected.
    ErrorBody:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        request_id:
          type: string
          title: Request Id
        details:
          anyOf:
            - items:
                $ref: '#/components/schemas/ErrorDetail'
              type: array
            - type: 'null'
          title: Details
      type: object
      required:
        - code
        - message
        - request_id
      title: ErrorBody
    ErrorDetail:
      properties:
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
        message:
          type: string
          title: Message
      type: object
      required:
        - message
      title: ErrorDetail
  securitySchemes:
    ApiKey:
      type: http
      description: A workspace API key, created under Settings, API keys.
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.