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

# Update Campaign

> Partially updates an existing campaign. Only fields provided in the request body are updated.

## Authentication
All requests require an `Authorization` header using Bearer token authentication:
`Authorization: Bearer <api_key>`



## OpenAPI

````yaml PATCH /api/v2/voice-campaigns/{campaign_id}
openapi: 3.1.0
info:
  title: VoiceAIWrapper API
  description: >-
    REST API for managing campaigns, leads, clients, web widgets, and voice
    providers on VoiceAIWrapper.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.voiceaiwrapper.app
security:
  - bearerAuth: []
paths:
  /api/v2/voice-campaigns/{campaign_id}:
    patch:
      tags:
        - Campaigns
      summary: Update Campaign
      description: >-
        Partially updates an existing campaign. Only fields provided in the
        request body are updated.


        ## Authentication

        All requests require an `Authorization` header using Bearer token
        authentication:

        `Authorization: Bearer <api_key>`
      operationId: updateCampaign
      parameters:
        - name: campaign_id
          in: path
          required: true
          description: Global ID of the campaign to update. Required.
          schema:
            type: string
            example: Vm9pY2VDYW1wYWlnbjoxMjM=
      requestBody:
        required: true
        description: >-
          Fields to update - all are optional; provide only those you want to
          change
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCampaignRequest'
      responses:
        '200':
          description: Campaign updated successfully. Returns updated campaign metadata.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: Campaign updated successfully
                  data:
                    type: object
                    properties:
                      campaign_id:
                        type: string
                        example: Vm9pY2VDYW1wYWlnbjoxMjM=
                      campaign_name:
                        type: string
                        example: Q4 Outreach Updated
                      campaign_type:
                        type: string
                        example: OUTBOUND
                      campaign_status:
                        type: string
                        example: DRAFT
        '400':
          description: >-
            Invalid request data. Common causes: empty body, immutable type
            change, invalid dialer/assistant/schedule values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorWithList'
              example:
                message: Campaign type cannot be changed after creation
                errors:
                  - Campaign type is immutable
        '401':
          description: Authentication failed. Ensure the Bearer token is present and valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: >-
            Resource not found. Verify campaign_id, voiceai_pod_id, and
            assistant_id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              example:
                message: Campaign not found
        '500':
          description: Internal server error. Contact support if this persists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              example:
                message: Internal server error
components:
  schemas:
    UpdateCampaignRequest:
      type: object
      properties:
        name:
          type: string
          description: Updated campaign display name. Optional.
          example: Q4 Outreach v2
        assistant_id:
          type: string
          description: >-
            Updated provider-native assistant ID. Optional. Validated against
            the voice provider.
          example: asst_xyz456
        tenant_voice_provider_id:
          type: string
          description: |-
            Updated global ID of the tenant voice provider. Optional.
              Note: `tenant_voice_provider_id` = `voiceai_pod_id`
          example: VGVuYW50Vm9pY2VQcm92aWRlcjoxMjM=
        dialer_type:
          type: string
          enum:
            - SINGLE
            - POOL
          description: Updated dialer type. Optional.
          example: POOL
        phone_number_id:
          type: string
          description: Updated provider-native phone number ID. Optional.
          example: pn_xyz456
        phone_number_pool_id:
          type: string
          description: >-
            Updated global ID of the phone number pool (POOL dialer only).
            Optional.
          example: Vm9pY2VQaG9uZU51bWJlclBvb2w6MTIz
        timezone:
          type: string
          description: Updated IANA timezone. Optional.
          example: America/Chicago
        days_of_week:
          type: array
          items:
            type: string
          description: Updated active days of the week. Optional.
          example:
            - MONDAY
            - WEDNESDAY
            - FRIDAY
        daily_start_time:
          type: string
          description: 'Updated daily call start time (HH:MM or HH:MM:SS). Optional. '
          example: '08:00'
        daily_end_time:
          type: string
          description: Updated daily call end time (HH:MM or HH:MM:SS). Optional.
          example: '18:00'
        max_call_attempts:
          type: integer
          minimum: 1
          description: Updated maximum total call attempts per lead. Optional.
          example: 5
        max_daily_attempts:
          type: integer
          minimum: 1
          description: Updated maximum call attempts per lead per day. Optional.
          example: 2
        min_gap_between_attempts:
          type: integer
          minimum: 3
          description: Updated minimum minutes between attempts. Optional.
          example: 120
        consider_voicemail_as_answered:
          type: boolean
          description: Updated voicemail-as-answered setting. Optional.
          example: false
        webhook_url:
          type: string
          format: uri
          description: Updated webhook URL. Optional.
          example: https://yourapp.com/webhooks/campaign
    ErrorWithList:
      type: object
      properties:
        message:
          type: string
        errors:
          type: array
          items:
            type: string
    ErrorMessage:
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````