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

# Update campaign (attach/detach list)



## OpenAPI

````yaml api-reference/openapi.json patch /campaign/{campaign_id}
openapi: 3.1.0
info:
  title: Kathan API
  description: Building a fundamentally new kind of world for Conversational AI.
  version: 2.0.1
servers:
  - url: https://api.staging.kathan.tech
    description: Staging
security: []
tags:
  - name: Assistants
    description: Create and manage AI voice agents. Configure voice, LLM, knowledge bases.
  - name: Phone Numbers
    description: Configure and attach phone numbers to assistants. Twilio & Vobiz.
  - name: Calls
    description: Call logs, recordings, and outbound call management.
  - name: Knowledge Bases
    description: Upload documents, create knowledge bases, attach to assistants.
  - name: Campaigns
    description: Create and run outbound campaigns. Attach recipient lists, start/pause.
  - name: Recipient Lists
    description: Contact lists for campaigns. Create from CSV, manage recipients.
  - name: Chat
    description: Text chat with assistants. Create sessions, send messages.
  - name: API Keys
    description: Create and manage API keys for authentication.
  - name: Organizations
    description: Organization and team management. Invites, members.
  - name: Credits
    description: Usage credits and billing.
  - name: Users
    description: User profile and account management.
paths:
  /campaign/{campaign_id}:
    patch:
      tags:
        - Campaigns
        - Campaigns
      summary: Update campaign (attach/detach list)
      operationId: update_campaign_public_campaign__campaign_id__patch
      parameters:
        - name: campaign_id
          in: path
          required: true
          schema:
            type: string
            title: Campaign Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignUpdateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignPublic'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
          XUserId: []
components:
  schemas:
    CampaignUpdateRequest:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        scheduleStartTime:
          anyOf:
            - type: string
            - type: 'null'
          title: Schedulestarttime
        scheduleEndTime:
          anyOf:
            - type: string
            - type: 'null'
          title: Scheduleendtime
        max_concurrency:
          anyOf:
            - type: integer
              maximum: 200
              minimum: 1
            - type: 'null'
          title: Max Concurrency
        retry_policy:
          anyOf:
            - type: object
            - type: 'null'
          title: Retry Policy
        speech_settings:
          anyOf:
            - $ref: '#/components/schemas/SpeechSettings'
            - type: 'null'
        campaign_context:
          anyOf:
            - type: string
            - type: 'null'
          title: Campaign Context
        opening_message_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Opening Message Template
        use_returning_greeting:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Use Returning Greeting
        use_short_term_summaries:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Use Short Term Summaries
        short_term_summaries_limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Short Term Summaries Limit
        machine_detection_timeout_seconds:
          anyOf:
            - type: integer
              maximum: 60
              minimum: 3
            - type: 'null'
          title: Machine Detection Timeout Seconds
        recipient_list_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Recipient List Id
        recipients:
          anyOf:
            - items:
                $ref: '#/components/schemas/RecipientPayload'
              type: array
            - type: 'null'
          title: Recipients
      type: object
      title: CampaignUpdateRequest
      description: >-
        Update campaign fields only. Use action endpoints for
        start/pause/save_draft.
    CampaignPublic:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        assistant_id:
          type: string
          title: Assistant Id
        assistant_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Assistant Name
        channel:
          type: string
          title: Channel
        phone_number_id:
          type: string
          title: Phone Number Id
        caller_id_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Caller Id Number
        status:
          type: string
          title: Status
          description: 'Read-only. Server-managed: draft | running | paused | completed'
        schedule_start_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Schedule Start Time
        schedule_end_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Schedule End Time
        max_concurrency:
          type: integer
          title: Max Concurrency
        retry_policy:
          type: object
          title: Retry Policy
        speech_settings:
          $ref: '#/components/schemas/SpeechSettings'
        campaign_context:
          anyOf:
            - type: string
            - type: 'null'
          title: Campaign Context
        opening_message_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Opening Message Template
        use_returning_greeting:
          type: boolean
          title: Use Returning Greeting
          default: false
        use_short_term_summaries:
          type: boolean
          title: Use Short Term Summaries
          default: false
        short_term_summaries_limit:
          anyOf:
            - type: integer
            - type: 'null'
          title: Short Term Summaries Limit
        machine_detection_timeout_seconds:
          anyOf:
            - type: integer
            - type: 'null'
          title: Machine Detection Timeout Seconds
        recipient_list_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Recipient List Id
        recipient_list_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Recipient List Name
        recipient_list_row_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Recipient List Row Count
        counts:
          anyOf:
            - additionalProperties:
                type: integer
              type: object
            - type: 'null'
          title: Counts
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
      type: object
      required:
        - id
        - name
        - assistant_id
        - channel
        - phone_number_id
        - status
        - max_concurrency
        - retry_policy
        - speech_settings
      title: CampaignPublic
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SpeechSettings:
      properties:
        style:
          type: string
          enum:
            - professional
            - neutral
            - support
            - casual
            - sales
          title: Style
          default: neutral
        responsiveness:
          type: string
          enum:
            - instant
            - fast
            - balanced
            - patient
            - deliberate
          title: Responsiveness
          default: balanced
        interruptions:
          type: string
          enum:
            - 'off'
            - soft
            - 'on'
            - aggressive
          title: Interruptions
          default: 'on'
        emotions:
          type: string
          enum:
            - 'off'
            - subtle
            - natural
            - expressive
          title: Emotions
          default: natural
      type: object
      title: SpeechSettings
    RecipientPayload:
      properties:
        phone_number:
          type: string
          title: Phone Number
        metadata:
          anyOf:
            - type: object
            - type: 'null'
          title: Metadata
        assistant_overrides:
          anyOf:
            - type: object
            - type: 'null'
          title: Assistant Overrides
      type: object
      required:
        - phone_number
      title: RecipientPayload
    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:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key authentication.
    XUserId:
      type: apiKey
      in: header
      name: X-User-ID
      description: Required user id for API key requests.

````