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

# Enroll Contacts in a Campaign

> Enrolls contacts into a campaign by creating a new audience named `audience_name`, attaching it to the campaign, and adding the contacts to it. The campaign must be `active` or `paused`. Sequences are created asynchronously; contacts already enrolled in the campaign are deduplicated then and still count as successes here. This always creates a new audience. Before calling this tool, if the campaign already has audiences, you MUST ask the user whether to create a new audience or add the contacts to an existing one via `add_contacts_to_audience` — and warn them that audiences can be shared, so adding contacts to a shared audience enrolls them in every campaign that uses it.



## OpenAPI

````yaml https://api.monaco.com/openapi.json post /v1/campaigns/{campaign_id}/enroll
openapi: 3.1.0
info:
  title: Monaco Public API
  description: Public API for Monaco
  version: 1.0.0
servers:
  - url: https://api.monaco.com
security: []
paths:
  /v1/campaigns/{campaign_id}/enroll:
    post:
      tags:
        - Campaigns
      summary: Enroll Contacts in a Campaign
      description: >-
        Enrolls contacts into a campaign by creating a new audience named
        `audience_name`, attaching it to the campaign, and adding the contacts
        to it. The campaign must be `active` or `paused`. Sequences are created
        asynchronously; contacts already enrolled in the campaign are
        deduplicated then and still count as successes here. This always creates
        a new audience. Before calling this tool, if the campaign already has
        audiences, you MUST ask the user whether to create a new audience or add
        the contacts to an existing one via `add_contacts_to_audience` — and
        warn them that audiences can be shared, so adding contacts to a shared
        audience enrolls them in every campaign that uses it.
      operationId: enroll_contacts_in_campaign
      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/EnrollContactsInCampaignRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PublicItemResponse_EnrollContactsInCampaignResponse_
              example:
                data:
                  success_count: 3
                  failure_count: 1
                  failure_reasons:
                    - code: contact_not_found
                      description: contact not found
                      count: 1
                meta:
                  timestamp: '2026-07-09T10:30:00Z'
        '400':
          description: Campaign is not enrollable or the audience name is taken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
        '404':
          description: Campaign not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
        4XX:
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicErrorResponse'
components:
  schemas:
    EnrollContactsInCampaignRequest:
      properties:
        audience_name:
          type: string
          maxLength: 255
          minLength: 1
          title: Audience Name
          description: >-
            Name for the new audience created to hold these contacts; pick
            something short and relevant to the enrollment. Must be unique
            within the organization — a duplicate name is rejected, so vary it
            and retry.
          examples:
            - Q3 Enterprise Outbound — July batch
        contact_ids:
          items:
            type: string
            format: uuid
          type: array
          maxItems: 10000
          minItems: 1
          title: Contact Ids
          description: IDs of the contacts to enroll in the campaign
          examples:
            - - 550e8400-e29b-41d4-a716-446655440020
      type: object
      required:
        - audience_name
        - contact_ids
      title: EnrollContactsInCampaignRequest
    PublicItemResponse_EnrollContactsInCampaignResponse_:
      properties:
        data:
          $ref: '#/components/schemas/EnrollContactsInCampaignResponse'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
      type: object
      required:
        - data
      title: PublicItemResponse[EnrollContactsInCampaignResponse]
    PublicErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - error
      title: PublicErrorResponse
    EnrollContactsInCampaignResponse:
      properties:
        success_count:
          type: integer
          title: Success Count
          description: Contacts added to the campaign's new audience
          examples:
            - 2
        failure_count:
          type: integer
          title: Failure Count
          description: >-
            Contacts that could not be added (e.g. not found in the
            organization)
          examples:
            - 1
        failure_reasons:
          items:
            $ref: '#/components/schemas/EnrollFailureReason'
          type: array
          title: Failure Reasons
          description: Failure reasons with the number of contacts affected by each
      type: object
      required:
        - success_count
        - failure_count
      title: EnrollContactsInCampaignResponse
      description: |-
        Aggregate outcome of enrolling contacts into a campaign.

        Counts reflect contacts added to the campaign's new audience. Sequence
        creation happens asynchronously, so contacts already enrolled in the
        campaign are deduplicated later and still count as successes here.
    ResponseMeta:
      properties:
        timestamp:
          type: string
          format: date-time
          title: Timestamp
          description: Server timestamp of the response
      type: object
      title: ResponseMeta
    ErrorDetail:
      properties:
        code:
          type: string
          title: Code
          description: Machine-readable error code
          examples:
            - not_found
        message:
          type: string
          title: Message
          description: Human-readable error message
          examples:
            - Resource not found
      type: object
      required:
        - code
        - message
      title: ErrorDetail
    EnrollFailureReason:
      properties:
        code:
          type: string
          title: Code
          description: Failure reason code (e.g. contact_has_active_sequence,)
          examples:
            - contact_has_active_sequence
        description:
          type: string
          title: Description
          description: Human-readable description of the failure reason
          examples:
            - existing active sequence
        count:
          type: integer
          title: Count
          description: Number of contacts that hit this failure
          examples:
            - 1
      type: object
      required:
        - code
        - description
        - count
      title: EnrollFailureReason
      description: A categorized enrollment failure with the count of affected contacts.

````