> ## 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.

# Actualizar campaña



## OpenAPI

````yaml /es/openapi.json patch /v1/campaigns/{id}
openapi: 3.0.0
info:
  title: Nuvia API - Empresa
  description: Documentación de la API para empresas
  version: '1.0'
  contact: {}
servers:
  - url: https://api.nuvia.ai
security: []
tags:
  - name: messages
    x-group: Mensajes
  - name: contacts
    x-group: Contactos
  - name: campaigns
    x-group: Campañas
  - name: tables
    x-group: Tablas y listas
  - name: agents
    x-group: Agentes
  - name: conversations
    x-group: Conversaciones
  - name: inboxes
    x-group: Inboxes
  - name: knowledge
    x-group: Base de conocimiento
  - name: Webhooks
    x-group: Webhooks
  - name: campaign-enrollments
    x-group: Inscripciones en Campaña
  - name: custom-fields
    x-group: Campos personalizados
  - name: resources
    x-group: Archivos y adjuntos
  - name: hubspot
    x-group: HubSpot
  - name: users
    x-group: Usuarios
paths:
  /v1/campaigns/{id}:
    patch:
      tags:
        - campaigns
      summary: Actualizar campaña
      operationId: CampaignController_update
      parameters:
        - name: x-company-id
          in: header
          description: >-
            Identificador de la empresa objetivo. Obligatorio solo para API keys
            globales (type=global). Se ignora para API keys de empresa y
            usuarios humanos.
          required: false
          schema:
            type: string
        - name: id
          required: true
          in: path
          description: ID de la campaña
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCampaignDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
      security:
        - JWT-auth: []
components:
  schemas:
    UpdateCampaignDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        description:
          type: string
          maxLength: 500
        channel_type:
          type: string
          enum:
            - WAP_AUTO_CLOSER
            - WEB_V2
            - EVOLUTION_API
            - LINKEDIN
            - VOICE
            - MULTI_CHANNEL
        trigger_config:
          type: object
          properties:
            scheduled_at:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            recurring_pattern:
              type: string
            recurring_timezone:
              type: string
            recurring_end_at:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        audience_config:
          type: object
          properties:
            type:
              type: string
              enum:
                - STATIC
                - DYNAMIC
                - EXTERNAL
                - LIST
                - FUNNEL
            filters:
              type: object
              properties:
                agent_step_ids:
                  type: array
                  items:
                    type: string
                agent_ids:
                  type: array
                  items:
                    type: string
                conversation_status:
                  type: array
                  items:
                    type: string
                user_ids:
                  type: array
                  items:
                    type: string
            match_criteria:
              type: object
              properties:
                match_logic:
                  default: AND
                  description: Lógica de combinación entre grupos
                  type: string
                  enum:
                    - AND
                    - OR
                filter_groups:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      logic:
                        type: string
                        enum:
                          - AND
                          - OR
                        description: Lógica de combinación de las condiciones
                      conditions:
                        minItems: 1
                        type: array
                        items:
                          anyOf:
                            - type: object
                              properties:
                                field_id:
                                  type: string
                                  minLength: 1
                                  description: >-
                                    ID del campo personalizado o path fijo (ej.:
                                    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: Operador de comparación
                                value:
                                  description: Valor para la comparación
                                  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
              nullable: true
            contact_ids:
              type: array
              items:
                type: string
            lists:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                  views:
                    type: array
                    items:
                      type: string
                required:
                  - id
            funnel_config:
              type: object
              properties:
                agent_id:
                  type: string
                  minLength: 1
                agent_step_id:
                  type: string
              required:
                - agent_id
              nullable: true
        behavior_config:
          type: object
          properties:
            ignore_business_hours:
              type: boolean
            skip_if_active_conversation:
              type: boolean
            active_conversation_window_minutes:
              type: integer
              minimum: 15
              maximum: 43200
        linkedin_config:
          type: object
          properties:
            first_step_as_invitation:
              type: boolean
            send_invite_note:
              type: boolean
            invite_note:
              type: string
        sender_config:
          type: object
          properties:
            linkedin_inbox_id:
              type: string
              minLength: 1
            whatsapp_inbox_id:
              type: string
              minLength: 1
            voice_inbox_id:
              type: string
              minLength: 1
        voice_config:
          type: object
          properties:
            max_concurrent_calls:
              type: integer
              minimum: 1
              maximum: 500
          required:
            - max_concurrent_calls
        exclusion_lists:
          type: array
          maxItems: 50
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^[a-f0-9]{24}$
            required:
              - id
        status:
          enum:
            - DRAFT
            - ACTIVE
            - PAUSED
            - COMPLETED
            - ARCHIVED
          type: string
  securitySchemes:
    JWT-auth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Token JWT de autenticación

````

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