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

# Add a contact group to a campaign

> Creates new conversations by adding every contact in a contact group to a campaign.

Responses include direct Enginy app URLs when available. Responses include a `campaignAppUrl` that opens the campaign in Enginy. MCP agents should return those URLs to users whenever they are present in the response.

    > **Required scope:** `CAMPAIGNS_WRITE`
    >
    > **Rate limit:** 30 requests per minute



## OpenAPI

````yaml https://openapi.enginy.ai/definitions.json post /v1/add-contact-group-to-campaign
openapi: 3.1.0
info:
  title: Enginy API
  version: 1.0.0
  description: Public API for Enginy platform
servers:
  - url: https://openapi.enginy.ai
    description: Configured server
security: []
tags:
  - name: AI Variables
    description: >-
      Manage AI variables and discover the entity fields you can reference in
      prompts and entity requests.
  - name: Inbox
    description: >-
      Inbox endpoints for listing contact threads, reading thread messages,
      managing tags, and sending manual replies.
  - name: Workflows
    description: >-
      Build, validate, publish, run, and inspect advanced (graph) workflows,
      plus the block/condition catalog needed to author a workflow plan.
paths:
  /v1/add-contact-group-to-campaign:
    post:
      tags:
        - Campaigns
      summary: Add a contact group to a campaign
      description: >-
        Creates new conversations by adding every contact in a contact group to
        a campaign.


        Responses include direct Enginy app URLs when available. Responses
        include a `campaignAppUrl` that opens the campaign in Enginy. MCP agents
        should return those URLs to users whenever they are present in the
        response.

            > **Required scope:** `CAMPAIGNS_WRITE`
            >
            > **Rate limit:** 30 requests per minute
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                campaignId:
                  type: integer
                  exclusiveMinimum: 0
                  description: ID of the campaign to add the contact group to
                contactGroupId:
                  type: integer
                  exclusiveMinimum: 0
                  description: ID of the contact group to add to the campaign
              required:
                - campaignId
                - contactGroupId
      responses:
        '200':
          description: Contact group processed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      requestedCount:
                        type: number
                        description: Number of contacts found in the contact group
                      addedCount:
                        type: number
                        description: Number of new conversations created
                      reactivatedCount:
                        type: number
                        description: Number of paused conversations reactivated
                      alreadyInCampaignCount:
                        type: number
                        description: Number of contacts already present in the campaign
                      skippedDeletedConversationCount:
                        type: number
                        description: >-
                          Number of contacts skipped because their conversation
                          is deleted
                      skippedContactIds:
                        type: array
                        items:
                          type: number
                        description: >-
                          Contact IDs skipped because their campaign
                          conversation is deleted
                      campaignStatus:
                        type: string
                        description: Status of the campaign
                      campaignAppUrl:
                        type: string
                        format: uri
                        description: Direct Enginy app URL for opening the campaign.
                    required:
                      - requestedCount
                      - addedCount
                      - reactivatedCount
                      - alreadyInCampaignCount
                      - skippedDeletedConversationCount
                      - skippedContactIds
                      - campaignStatus
                      - campaignAppUrl
                required:
                  - status
                  - message
                  - data
        '400':
          description: Bad request - validation error
        '404':
          description: Campaign or contact group not found
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````