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

# Add promoters to campaign

> With this endpoint you can add promoters to a campaign. 
 <Note>If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`</Note> 
 <Tip>**HTTP Request** <br/>`POST https://api.firstpromoter.com/api/v2/company/promoters/add_to_campaign`</Tip>



## OpenAPI

````yaml openapi-v2-promoters post /promoters/add_to_campaign
openapi: 3.0.1
info:
  title: FirstPromoter API
  version: '1.0'
  description: API documentation for FirstPromoter promoters management
servers:
  - url: https://api.firstpromoter.com/api/v2/company
security:
  - BearerAuth: []
paths:
  /promoters/add_to_campaign:
    post:
      tags:
        - Promoters
      summary: Add promoters to campaign
      description: |-
        With this endpoint you can add promoters to a campaign. 
         <Note>If there are more than __5__ ids on the __ids__ param/field, the action will be processed asynchronously. The response for the batch status will most likely be `in_progress`. The available statuses are `pending`, `in_progress`, `completed`, `failed` and `stopped`</Note> 
         <Tip>**HTTP Request** <br/>`POST https://api.firstpromoter.com/api/v2/company/promoters/add_to_campaign`</Tip>
      operationId: addPromotersToCampaign
      parameters:
        - $ref: '#/components/parameters/AccountId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - selection
                - campaign_id
              properties:
                ids:
                  $ref: '#/components/schemas/Ids'
                campaign_id:
                  type: integer
                  description: The ID of the campaign promoter will be added to
                drip_emails:
                  type: boolean
                  description: >-
                    If true, it will send an email to the promoter for this
                    action
      responses:
        '200':
          description: Operation completed successfully
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BatchOperationResponse'
                  - properties:
                      status:
                        type: string
                        enum:
                          - completed
                        description: >-
                          Status of the batch operation (always completed for
                          synchronous operations)
        '202':
          description: Batch operation accepted and processing
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BatchOperationResponse'
                  - properties:
                      status:
                        type: string
                        enum:
                          - pending
                        description: >-
                          Status of the batch operation (initially pending for
                          asynchronous operations)
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    AccountId:
      name: Account-ID
      in: header
      required: true
      description: >-
        Account id. You can find your Account ID on Your FirstPromoter
        Dashboard. Navigate to Settings → Integrations
      schema:
        type: string
  schemas:
    Ids:
      type: array
      description: >-
        Array of promoter ids. If there are more than __5__ ids on this
        param/field, the action will be processed asynchronously. The response
        for the batch status will most likely be `in_progress`. The available
        statuses are `pending`, `in_progress`, `completed`, `failed` and
        `stopped`
      items:
        type: integer
    BatchOperationResponse:
      type: object
      properties:
        id:
          type: integer
          description: Batch ID
        status:
          type: string
          enum:
            - completed
            - pending
            - in_progress
            - failed
            - stopped
          description: Status of the batch operation
        total:
          type: integer
          description: Total number of promoters
        selected_total:
          type: integer
          description: Total number of selected promoters
        processed_count:
          type: integer
          description: Number of processed promoters
        failed_count:
          type: integer
          description: Number of failed promoters
        action_label:
          type: string
          description: Label for the action
        created_at:
          type: string
          format: date-time
          description: Creation date of the batch operation
        updated_at:
          type: string
          format: date-time
          description: Last update date of the batch operation
        meta:
          type: object
          description: Additional metadata
        progress:
          type: integer
          description: Progress of the batch operation
        processing_errors:
          type: array
          items:
            type: string
          description: List of processing errors if any
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key passed as a Bearer token in the Authorization header. You can
        find your API Key on Your FirstPromoter Dashboard. Navigate to Settings
        → Integrations section → Manage API Keys

````