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

# Update Campaign Status

> Updates the status of a campaign.



## OpenAPI

````yaml PUT /api/v1/campaigns/{campaign_id}/status
openapi: 3.1.0
info:
  title: kollie-backend
  version: v1
servers: []
security: []
paths:
  /api/v1/campaigns/{campaign_id}/status:
    put:
      tags:
        - campaigns
      summary: Update Campaign
      description: |-
        Updates a campaign by its id
        - can only update paused campaigns.

        Required roles:
        - admin
        - manager
      operationId: update_campaign_api_v1_campaigns__campaign_id__status_put
      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/ICampaignUpdateStatus'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPutResponseBase_ICampaignRead_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    ICampaignUpdateStatus:
      properties:
        status:
          $ref: '#/components/schemas/ICampaignStatusEnum'
      type: object
      required:
        - status
      title: ICampaignUpdateStatus
    IPutResponseBase_ICampaignRead_:
      properties:
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          default: Data updated correctly
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - {}
            - type: 'null'
          title: Meta
          default: {}
        data:
          anyOf:
            - $ref: '#/components/schemas/ICampaignRead'
            - type: 'null'
      type: object
      title: IPutResponseBase[ICampaignRead]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ICampaignStatusEnum:
      type: string
      enum:
        - draft
        - paused
        - running
        - finished
        - canceled
      title: ICampaignStatusEnum
    ICampaignRead:
      properties:
        name:
          type: string
          title: Name
        agent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Agent Id
        status:
          $ref: '#/components/schemas/ICampaignStatusEnum'
          default: draft
        start_date:
          type: string
          format: date-time
          title: Start Date
        end_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End Date
        start_time:
          type: string
          format: time
          title: Start Time
        end_time:
          type: string
          format: time
          title: End Time
        phone_numbers:
          items:
            type: string
          type: array
          title: Phone Numbers
          default: []
        organization_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organization Id
        additional_params:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Additional Params
          default: {}
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - name
        - end_date
        - start_time
        - end_time
        - id
        - created_at
      title: ICampaignRead
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer

````