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

# Update Campaign

> Update a campaign based on the ID supplied



## OpenAPI

````yaml openapi-campaigns PATCH /campaigns/{campaign_id}
openapi: 3.0.1
info:
  title: Puretalk AI
  description: Api Documentation for Puretalk AI
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.puretalk.ai/api
security:
  - ApiKeyAuth: []
paths:
  /campaigns/{campaign_id}:
    patch:
      description: Update a campaign based on the ID supplied
      parameters:
        - name: campaign_id
          in: path
          description: ID of campaign to update
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the campaign
                  example: My Campaign
                start_date:
                  type: string
                  description: Start date of the campaign
                  example: '2021-01-01'
                end_date:
                  type: string
                  description: End date of the campaign
                  example: '2021-01-01'
                ai_assistant_id:
                  type: string
                  description: ID of the AI assistant to use for the campaign
                  example: 123e4567-e89b-12d3-a456-426614174000
                type:
                  type: string
                  description: Type of the campaign
                  example: call
              required:
                - name
                - start_date
                - end_date
                - ai_assistant_id
                - type
      responses:
        '200':
          description: Campaign updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        err:
          type: boolean
          description: Indicates if the response is an error
          example: false
        msg:
          type: string
          description: Message from the API
          example: Error message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Authorization header containing API key. You can find your API key in
        the dashboard under 'API Keys'.

````