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

# List who is left out of the campaign

> People in the audience who don't receive the campaign, with the reason. No enrollment is created. Takes the same body as the audience preview, plus pagination, search by name and a filter by reason.



## OpenAPI

````yaml /en/openapi.json post /v1/campaigns/audience-preview/excluded
openapi: 3.0.0
info:
  title: Nuvia API - Company
  description: API documentation for companies
  version: '1.0'
  contact: {}
servers:
  - url: https://api.nuvia.ai
security: []
tags:
  - name: messages
    x-group: Mensagens
  - name: contacts
    x-group: Contatos
  - name: campaigns
    x-group: Campanhas
  - name: tables
    x-group: Tabelas e Listas
  - name: agents
    x-group: Agentes
  - name: conversations
    x-group: Conversas
  - name: inboxes
    x-group: Caixas de Entrada
  - name: knowledge
    x-group: Base de Conhecimento
  - name: Webhooks
    x-group: Webhooks
  - name: campaign-enrollments
    x-group: Inscrições em Campanha
  - name: custom-fields
    x-group: Campos Customizados
  - name: resources
    x-group: Arquivos e Anexos
  - name: hubspot
    x-group: HubSpot
paths:
  /v1/campaigns/audience-preview/excluded:
    post:
      tags:
        - campaigns
      summary: List who is left out of the campaign
      description: >-
        People in the audience who don't receive the campaign, with the reason.
        No enrollment is created. Takes the same body as the audience preview,
        plus pagination, search by name and a filter by reason.
      operationId: CampaignController_audiencePreviewExcluded
      parameters:
        - name: x-company-id
          in: header
          description: >-
            Target company identifier. Required only for global API keys
            (type=global). Ignored for company API keys and human users.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AudiencePreviewExcludedBodyDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
      security:
        - JWT-auth: []
components:
  schemas:
    AudiencePreviewExcludedBodyDto:
      type: object
      properties:
        channel_type:
          type: string
          description: The campaign's sending channel. Defines the per-channel validation.
          enum:
            - WAP_AUTO_CLOSER
            - WEB_V2
            - EVOLUTION_API
            - LINKEDIN
            - MULTI_CHANNEL
        audience_config:
          type: object
          description: Simulated audience, in the same format as campaign creation.
          properties:
            type:
              description: Audience type.
              type: string
              enum:
                - STATIC
                - DYNAMIC
                - EXTERNAL
                - LIST
                - FUNNEL
            contact_ids:
              description: Contact IDs, for a `STATIC` audience.
              type: array
              items:
                type: string
            lists:
              description: Contact lists, for a `LIST` audience.
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    description: List ID.
                  views:
                    description: >-
                      IDs of the list's views. They don't restrict anything
                      today: the whole list is considered.
                    type: array
                    items:
                      type: string
                required:
                  - id
            funnel_config:
              description: Funnel (agent) and, optionally, step, for a `FUNNEL` audience.
              type: object
              properties:
                agent_id:
                  type: string
                  minLength: 1
                agent_step_id:
                  type: string
              required:
                - agent_id
            match_criteria:
              description: Field filters applied to the audience.
              type: object
              properties:
                match_logic:
                  default: AND
                  description: How the groups are combined
                  type: string
                  enum:
                    - AND
                    - OR
                filter_groups:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      logic:
                        type: string
                        enum:
                          - AND
                          - OR
                        description: How the conditions are combined
                      conditions:
                        minItems: 1
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                field_id:
                                  type: string
                                  minLength: 1
                                  description: >-
                                    ID of the custom field or a fixed path (e.g.
                                    contact.name, contact.email)
                                operator:
                                  type: string
                                  enum:
                                    - eq
                                    - neq
                                    - gt
                                    - gte
                                    - lt
                                    - lte
                                    - contains
                                    - not_contains
                                    - starts_with
                                    - ends_with
                                    - is_empty
                                    - is_not_empty
                                    - in
                                    - not_in
                                  description: Comparison operator
                                value:
                                  description: Value to compare
                                  anyOf:
                                    - type: string
                                      nullable: true
                                    - type: number
                                      nullable: true
                                    - type: boolean
                                      nullable: true
                                    - type: array
                                      items:
                                        type: string
                                      nullable: true
                              required:
                                - field_id
                                - operator
                            - type: object
                    required:
                      - logic
                      - conditions
              required:
                - filter_groups
        behavior_config:
          type: object
          description: Open conversation rule, as configured on the screen.
          properties:
            skip_if_active_conversation:
              description: >-
                If true, anyone who already has an open conversation is left out
                (the "Already has an open conversation" rule).
              type: boolean
            active_conversation_window_minutes:
              description: Window, in minutes, that defines an open conversation.
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
        exclusion_lists:
          type: array
          description: >-
            Exclusion lists, in the order they were added. Anyone in them is
            left out.
          items:
            type: object
            properties:
              id:
                type: string
                description: Exclusion list ID.
            required:
              - id
        page:
          type: integer
          description: Page. Default 1.
          minimum: -9007199254740991
          maximum: 9007199254740991
        limit:
          type: integer
          description: Items per page. Default 20, maximum 100.
          minimum: -9007199254740991
          maximum: 9007199254740991
        search:
          type: string
          description: Search by contact name.
        reason:
          type: string
          description: Filters by the reason for being left out. Default `all`.
          enum:
            - all
            - filtered_out
            - active_conversation
            - exclusion_list
            - no_active_channel
  securitySchemes:
    JWT-auth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: JWT authentication token

````

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