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

# Update Campaign By Id

> Update variable



## OpenAPI

````yaml https://api.insighto.ai/api/v1/openapi.json put /api/v1/campaign/update/{campaign_id}
openapi: 3.1.0
info:
  title: Ragify
  version: v1
servers: []
security: []
paths:
  /api/v1/campaign/update/{campaign_id}:
    put:
      tags:
        - Campaign
      summary: Update Campaign By Id
      description: Update variable
      operationId: update_campaign_by_id_api_v1_campaign_update__campaign_id__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/ICampaignUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPutResponseBase_ICampaignUpdate_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Your API Key: []
        - HTTPBearer: []
components:
  schemas:
    ICampaignUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        widget_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Widget Id
        type:
          anyOf:
            - $ref: '#/components/schemas/CampaignType'
            - type: 'null'
        attributes:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Attributes
        status:
          anyOf:
            - $ref: '#/components/schemas/CampaignStatus'
            - type: 'null'
        execution_weekdays:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Execution Weekdays
        time_window_start:
          anyOf:
            - type: string
              format: time
            - type: 'null'
          title: Time Window Start
        time_window_end:
          anyOf:
            - type: string
              format: time
            - type: 'null'
          title: Time Window End
        time_zone:
          anyOf:
            - type: string
            - type: 'null'
          title: Time Zone
        start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Time
        interval:
          anyOf:
            - type: integer
            - type: 'null'
          title: Interval
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
      type: object
      title: ICampaignUpdate
    IPutResponseBase_ICampaignUpdate_:
      properties:
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          default: Data updated successfully
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - {}
            - type: 'null'
          title: Meta
          default: {}
        data:
          anyOf:
            - $ref: '#/components/schemas/ICampaignUpdate'
            - type: 'null'
      type: object
      title: IPutResponseBase[ICampaignUpdate]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CampaignType:
      type: string
      enum:
        - outbound_call
      title: CampaignType
    CampaignStatus:
      type: string
      enum:
        - not_started
        - to_be_run
        - in_progress
        - paused
        - cancelled
        - completed
      title: CampaignStatus
    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:
    Your API Key:
      type: apiKey
      description: >-
        Your API key for authentication. You can generate it from the
        **Settings** page. Format: starts with `in-`.
      in: query
      name: api_key
    HTTPBearer:
      type: http
      scheme: bearer

````