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

> Updates the status of a campaign to one of the allowed values.

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



## OpenAPI

````yaml PATCH /api/v2/voice-campaigns/{campaign_id}/status
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}/status:
    patch:
      tags:
        - Campaigns
      summary: Update Campaign Status
      description: >-
        Updates the status of a campaign to one of the allowed values.


        ## Authentication

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

        `Authorization: Bearer <api_key>`
      operationId: updateCampaignStatus
      parameters:
        - name: campaign_id
          in: path
          required: true
          description: Global ID of the campaign. Required.
          schema:
            type: string
            example: Vm9pY2VDYW1wYWlnbjoxMjM=
      requestBody:
        required: true
        description: New campaign status
        content:
          application/json:
            schema:
              type: object
              required:
                - status
              properties:
                status:
                  type: string
                  enum:
                    - DRAFT
                    - SCHEDULED
                    - ACTIVE
                    - PAUSED
                    - ENDED
                  description: New campaign status. Required.
                  example: ACTIVE
      responses:
        '200':
          description: >-
            Campaign status updated successfully. Returns success flag and
            confirmation message.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Campaign status updated successfully
        '400':
          description: >-
            Invalid request data. Common causes: missing status, invalid status
            value, invalid campaign ID format, or invalid status transition.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      Invalid status. Must be one of: DRAFT, SCHEDULED, ACTIVE,
                      PAUSED, ENDED
                  valid_statuses:
                    type: array
                    items:
                      type: string
                    example:
                      - DRAFT
                      - SCHEDULED
                      - ACTIVE
                      - PAUSED
                      - ENDED
        '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. The campaign_id does not exist or does not
            belong to your tenant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
              example:
                message: Campaign not found
        '500':
          description: >-
            Internal server error. Unable to update campaign status. Contact
            support if this persists.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Unable to update the campaign status
                  error:
                    type: string
components:
  schemas:
    ErrorMessage:
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````