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

# Edit Campaign

> This endpoint allows editing campaign details like name, agent, budget, calling number, as well as performing actions like pause, resume, or complete the campaign.



## OpenAPI

````yaml PATCH /v2/camp-quickcamp/update/{campaign_id}/
openapi: 3.1.0
info:
  title: CloserX.ai API
  description: >-
    The CloserX.ai API provides programmatic access to manage AI-powered calling
    operations, including agent creation, campaign management, contact handling,
    telephony integration, and more. This API enables seamless automation and
    integration with CRM systems, telephony providers, and other third-party
    services for enhanced client communication and business operations.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.closerx.ai/api
security:
  - api_key: []
paths:
  /v2/camp-quickcamp/update/{campaign_id}/:
    patch:
      summary: Edit Campaign or Perform Status Actions
      description: >-
        This endpoint allows editing campaign details like name, agent, budget,
        calling number, as well as performing actions like pause, resume, or
        complete the campaign.
      parameters:
        - name: campaign_id
          in: path
          required: true
          description: The ID of the campaign to be updated
          schema:
            type: string
        - name: Company-Name
          in: header
          description: The name of the schema to be used for the request
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCampaignRequest'
            examples:
              EditCampaign:
                summary: Edit campaign details
                value:
                  name: string
                  new_agent: number
                  calling_number: string
                  total_bugget: number
                  priority: number
                  status: string
              PauseCampaign:
                summary: Pause campaign
                value:
                  status: paused
      responses:
        '200':
          description: Campaign updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateCampaignResponse'
              examples:
                EditCampaignResponse:
                  summary: Edit campaign response
                  value:
                    success: true
                    message: Campaign updated successfully
                    data:
                      campaign:
                        id: string
                        name: string
                        direction: string
                        agent: null | string
                        new_agent: number
                        contact_list: null | string
                        knowledge_base: null | string
                        calling_number: string
                        start_date: null | string
                        start_time: null | string
                        end_time: null | string
                        total_bugget: number
                        bugget_left: string
                        saturday: boolean
                        sunday: boolean
                        status: string
                        priority: number
                        created_at: string
                        updated_at: string
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateCampaignRequest:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates whether the update was successful
          example: true
        message:
          type: string
          description: Descriptive message for the API response
          example: Campaign updated successfully
        data:
          type: object
          description: Contains updated campaign information
          properties:
            campaign:
              type: object
              properties:
                id:
                  type: string
                  description: Unique campaign ID
                  example: campc005bf8a
                name:
                  type: string
                  description: Name of the campaign
                  example: Testing(amanEditCampaign)
                direction:
                  type: string
                  description: Direction of the campaign (Inbound/Outbound)
                  example: Inbound
                agent:
                  type:
                    - string
                    - 'null'
                  description: Agent assigned to the campaign
                  example: null
                new_agent:
                  type:
                    - integer
                    - 'null'
                  description: New agent ID assigned to the campaign
                  example: 527
                contact_list:
                  type:
                    - string
                    - 'null'
                  description: Associated contact list
                  example: null
                knowledge_base:
                  type:
                    - string
                    - 'null'
                  description: Associated knowledge base (if any)
                  example: null
                calling_number:
                  type: string
                  description: Calling number used in campaign
                  example: '+911149816890'
                start_date:
                  type:
                    - string
                    - 'null'
                  format: date
                  description: Start date of the campaign
                  example: null
                start_time:
                  type:
                    - string
                    - 'null'
                  format: time
                  description: Start time of the campaign
                  example: null
                end_time:
                  type:
                    - string
                    - 'null'
                  format: time
                  description: End time of the campaign
                  example: null
                total_bugget:
                  type: number
                  format: float
                  description: Total budget assigned
                  example: 158
                bugget_left:
                  type: string
                  description: Remaining budget (in string format)
                  example: '158.0000'
                saturday:
                  type: boolean
                  description: Whether the campaign runs on Saturdays
                  example: false
                sunday:
                  type: boolean
                  description: Whether the campaign runs on Sundays
                  example: false
                status:
                  type: string
                  description: Current campaign status
                  example: active
                priority:
                  type: integer
                  description: Campaign priority
                  example: 1
                created_at:
                  type: string
                  format: date-time
                  description: Campaign creation timestamp
                  example: '2025-08-23T10:44:41.275526Z'
                updated_at:
                  type: string
                  format: date-time
                  description: Last update timestamp
                  example: '2025-08-23T18:16:15.772412Z'
              required:
                - id
                - name
                - status
      required:
        - success
        - message
        - data
    UpdateCampaignResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Whether the update was successful
        message:
          type: string
          example: Campaign updated successfully
          description: Descriptive message about the result
        data:
          type: object
          properties:
            campaign:
              type: object
              properties:
                id:
                  type: string
                  example: campc005bf8a
                name:
                  type: string
                  example: TesTing(aman)
                direction:
                  type: string
                  example: Inbound
                agent:
                  type:
                    - integer
                    - 'null'
                  example: null
                new_agent:
                  type:
                    - integer
                    - 'null'
                  example: 527
                contact_list:
                  type:
                    - string
                    - 'null'
                  example: null
                knowledge_base:
                  type:
                    - string
                    - 'null'
                  example: null
                calling_number:
                  type: string
                  example: '+15076371471'
                start_date:
                  type:
                    - string
                    - 'null'
                  format: date
                  example: null
                start_time:
                  type:
                    - string
                    - 'null'
                  format: time
                  example: null
                end_time:
                  type:
                    - string
                    - 'null'
                  format: time
                  example: null
                total_bugget:
                  type: number
                  format: float
                  example: 58
                bugget_left:
                  type: string
                  example: '58.0000'
                saturday:
                  type: boolean
                  example: false
                sunday:
                  type: boolean
                  example: false
                status:
                  type: string
                  example: paused
                priority:
                  type: integer
                  example: 1
                created_at:
                  type: string
                  format: date-time
                  example: '2025-08-23T10:44:41.275526Z'
                updated_at:
                  type: string
                  format: date-time
                  example: '2025-08-23T17:47:12.678754Z'
    Error:
      required:
        - success
        - message
        - data
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api_key

````